Skip to content

Commit

Permalink
Version setter tasks for services
Browse files Browse the repository at this point in the history
  • Loading branch information
jupposessho committed Apr 2, 2024
1 parent a82a920 commit 6371862
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 49 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ description = """This is the top-level task that builds everything in release mo
to build for other target than the current one, can be linux/amd64 or linux/arm64. This is used for cross-compiling
for docker images."""
dependencies = [
"set-golem-template-service-version",
"set-golem-worker-service-version",
"set-golem-worker-executor-version",
"set-golem-shard-manager-version",
"build-release-default",
"build-release-override-linux-amd64",
"build-release-override-linux-arm64"
Expand Down Expand Up @@ -313,3 +317,48 @@ condition = { env = { "PLATFORM_OVERRIDE" = "linux/arm64" } }
env = { "PLATFORM_TARGET" = "aarch64-unknown-linux-gnu" }
extend = "package-release-base"
dependencies = ["build-release-override-linux-arm64"]


[tasks.set-golem-template-service-version]
description = "Sets the version in golem-template-service/Cargo.toml to the value of the VERSION environment variable"
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-template-service/Cargo.toml"]

[tasks.set-golem-template-service-version.mac]
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-template-service/Cargo.toml"]

[tasks.set-golem-worker-service-version]
description = "Sets the version in golem-worker-service/Cargo.toml to the value of the VERSION environment variable"
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-worker-service/Cargo.toml"]

[tasks.set-golem-worker-service-version.mac]
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-worker-service/Cargo.toml"]

[tasks.set-golem-worker-executor-version]
description = "Sets the version in golem-worker-executor/Cargo.toml to the value of the VERSION environment variable"
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-worker-executor/Cargo.toml"]

[tasks.set-golem-worker-executor-version.mac]
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-worker-executor/Cargo.toml"]

[tasks.set-golem-shard-manager-version]
description = "Sets the version in golem-shard-manager/Cargo.toml to the value of the VERSION environment variable"
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-shard-manager/Cargo.toml"]

[tasks.set-golem-shard-manager-version.mac]
condition = { env_set = ["VERSION"] }
command = "sed"
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-shard-manager/Cargo.toml"]
2 changes: 1 addition & 1 deletion golem-shard-manager/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "golem-shard-manager"
version = "0.1.0"
version = "0.0.0"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion golem-template-service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "golem-template-service"
version = "0.1.0"
version = "0.0.0"
edition = "2021"

[[bin]]
Expand Down

0 comments on commit 6371862

Please sign in to comment.