Browse Source

Update `[workspace.dependencies]` version and template version

tags/v0.2.0-candidate
haixuantao Haixuan Xavier Tao 3 years ago
parent
commit
4ee2659474
4 changed files with 12 additions and 7 deletions
  1. +3
    -3
      Cargo.toml
  2. +7
    -2
      binaries/cli/src/template/rust/mod.rs
  3. +1
    -1
      binaries/cli/src/template/rust/node/Cargo-template.toml
  4. +1
    -1
      binaries/cli/src/template/rust/operator/Cargo-template.toml

+ 3
- 3
Cargo.toml View File

@@ -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"


+ 7
- 2
binaries/cli/src/template/rust/mod.rs View File

@@ -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,
@@ -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()))?;
@@ -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()))?;


+ 1
- 1
binaries/cli/src/template/rust/node/Cargo-template.toml View File

@@ -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___" }

+ 1
- 1
binaries/cli/src/template/rust/operator/Cargo-template.toml View File

@@ -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___" }

Loading…
Cancel
Save