Skip to content

Commit

Permalink
Update [workspace.dependencies] version and template version
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Jan 18, 2023
1 parent b96e646 commit 74f1af0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ members = [
version = "0.1.3"

[workspace.dependencies]
dora-node-api = { version = "0.1.2", path = "apis/rust/node", default-features = false }
dora-operator-api = { version = "0.1.2", path = "apis/rust/operator", default-features = false }
dora-core = { version = "0.1.2", path = "libraries/core" }
dora-node-api = { version = "0.1.3", path = "apis/rust/node", default-features = false }
dora-operator-api = { version = "0.1.3", path = "apis/rust/operator", default-features = false }
dora-core = { version = "0.1.3", path = "libraries/core" }

[package]
name = "dora-examples"
Expand Down
9 changes: 7 additions & 2 deletions binaries/cli/src/template/rust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
path::{Path, PathBuf},
};

const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn create(args: crate::CommandNew) -> eyre::Result<()> {
let crate::CommandNew {
kind,
Expand Down Expand Up @@ -81,7 +82,9 @@ fn create_operator(name: String, path: Option<PathBuf>) -> Result<(), eyre::ErrR
fs::create_dir(&src)
.with_context(|| format!("failed to create directory `{}`", src.display()))?;

let cargo_toml = CARGO_TOML.replace("___name___", &name);
let cargo_toml = CARGO_TOML
.replace("___name___", &name)
.replace("___version___", &VERSION);
let cargo_toml_path = root.join("Cargo.toml");
fs::write(&cargo_toml_path, &cargo_toml)
.with_context(|| format!("failed to write `{}`", cargo_toml_path.display()))?;
Expand Down Expand Up @@ -117,7 +120,9 @@ fn create_custom_node(name: String, path: Option<PathBuf>) -> Result<(), eyre::E
fs::create_dir(&src)
.with_context(|| format!("failed to create directory `{}`", src.display()))?;

let cargo_toml = CARGO_TOML.replace("___name___", &name);
let cargo_toml = CARGO_TOML
.replace("___name___", &name)
.replace("___version___", &VERSION);
let cargo_toml_path = root.join("Cargo.toml");
fs::write(&cargo_toml_path, &cargo_toml)
.with_context(|| format!("failed to write `{}`", cargo_toml_path.display()))?;
Expand Down
2 changes: 1 addition & 1 deletion binaries/cli/src/template/rust/node/Cargo-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "v0.1.2" }
dora-node-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" }
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"
crate-type = ["cdylib"]

[dependencies]
dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "v0.1.2" }
dora-operator-api = { git = "https://github.com/dora-rs/dora.git", tag = "___version___" }

0 comments on commit 74f1af0

Please sign in to comment.