Skip to content

Commit cee4c99

Browse files
authored
Fix publishing step order (#310)
1 parent cc1f5a8 commit cee4c99

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ dependencies = [
5656
[tasks.build-release-default]
5757
description = "Build the project in release mode"
5858
condition = { env_not_set = ["PLATFORM_OVERRIDE"] }
59+
dependencies = [
60+
"set-golem-client-version", "set-golem-cli-version", # these need to be set before the build for publishing
61+
]
5962
command = "cargo"
6063
args = ["build", "--release"]
6164

@@ -228,27 +231,31 @@ dependencies = [
228231

229232
[tasks.set-golem-client-version]
230233
description = "Sets the version in golem-client/Cargo.toml to the value of the VERSION environment variable"
234+
condition = { env_set = ["VERSION"] }
231235
command = "sed"
232236
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-client/Cargo.toml"]
233237

234238
[tasks.set-golem-client-version.mac]
235239
description = "Sets the version in golem-client/Cargo.toml to the value of the VERSION environment variable"
240+
condition = { env_set = ["VERSION"] }
236241
command = "sed"
237242
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-client/Cargo.toml"]
238243

239244
[tasks.publish-golem-client]
240245
description = "Publishes golem-client package to crates.io"
241-
dependencies = ["set-golem-client-version", "set-golem-client-version", "build-release"]
246+
dependencies = ["set-golem-client-version", "set-golem-cli-version", "build-release"]
242247
command = "cargo"
243248
args = ["publish", "-p", "golem-client", "--all-features", "--allow-dirty"]
244249

245250
[tasks.set-golem-cli-version]
246251
description = "Sets the version in golem-cli/Cargo.toml to the value of the VERSION environment variable"
252+
condition = { env_set = ["VERSION"] }
247253
command = "sed"
248254
args = ["-i", "s/0\\.0\\.0/${VERSION}/g", "golem-cli/Cargo.toml"]
249255

250256
[tasks.set-golem-cli-version.mac]
251257
description = "Sets the version in golem-cli/Cargo.toml to the value of the VERSION environment variable"
258+
condition = { env_set = ["VERSION"] }
252259
command = "sed"
253260
args = ["-i", "", "s/0\\.0\\.0/${VERSION}/g", "golem-cli/Cargo.toml"]
254261

0 commit comments

Comments
 (0)