|
2 | 2 | [env]
|
3 | 3 | CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = "true"
|
4 | 4 |
|
5 |
| -# Run `cargo make release` to push a new minor release of every crate. |
| 5 | +# |
| 6 | +# Run `RELEASE_LEVEL=(patch|major|minor) cargo make release` to push a new release of every crate. |
| 7 | +# Run `RELEASE_LEVEL=(patch|major|minor) CARGO_MAKE_WORKSPACE_SKIP_MEMBERS="crate1;crate2;" cargo make release` |
| 8 | +# to push a new release of some crates. |
| 9 | +# |
| 10 | + |
6 | 11 | [tasks.release]
|
7 |
| -args = ["release", "--config", "../_build/release.toml"] |
| 12 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 13 | +workspace = false |
| 14 | +env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = "integration_tests/*" } |
| 15 | +command = "cargo" |
| 16 | +args = [ "make", "release-INTERNAL" ] |
| 17 | + |
| 18 | +[tasks.release-some] |
| 19 | +condition = { env_set = [ "RELEASE_LEVEL", "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" ] } |
| 20 | +workspace = false |
| 21 | +env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = "integration_tests/*" } |
| 22 | +command = "cargo" |
| 23 | +args = [ "make", "release-INTERNAL" ] |
| 24 | + |
| 25 | +# Hack to filter out crates we do not want to release. |
| 26 | +# See <https://github.com/sagiegurari/cargo-make/issues/212#issuecomment-481123564> |
| 27 | +[tasks.release-INTERNAL] |
| 28 | +private = true |
| 29 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 30 | +command = "cargo-release" |
| 31 | +args = ["release", "--config", "../_build/release.toml", "minor"] |
8 | 32 |
|
9 |
| -# Run `cargo make release-patch` to push a new patch release of every crate. |
10 |
| -[tasks.release-patch] |
11 |
| -args = ["release", "--config", "../_build/release.toml", "patch"] |
12 | 33 |
|
13 |
| -# Run `cargo make release-dry-run` to do a dry run. |
| 34 | +# |
| 35 | +# Run `RELEASE_LEVEL=(patch|major|minor) cargo make release-dry-run` to do a dry run. |
| 36 | +# Run `RELEASE_LEVEL=(patch|major|minor) CARGO_MAKE_WORKSPACE_SKIP_MEMBERS="crate1;crate2;" cargo make release-some-dry-run` |
| 37 | +# to do a dry run with some crates. |
| 38 | +# |
| 39 | + |
14 | 40 | [tasks.release-dry-run]
|
| 41 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 42 | +workspace = false |
| 43 | +env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = "integration_tests/*" } |
| 44 | +command = "cargo" |
| 45 | +args = [ "make", "release-dry-run-INTERNAL" ] |
| 46 | + |
| 47 | +[tasks.release-some-dry-run] |
| 48 | +condition = { env_set = [ "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS", "RELEASE_LEVEL" ] } |
| 49 | +workspace = false |
| 50 | +command = "cargo" |
| 51 | +args = [ "make", "release-dry-run-INTERNAL" ] |
| 52 | + |
| 53 | + |
| 54 | +# Hack to filter out crates we do not want to release. |
| 55 | +# See <https://github.com/sagiegurari/cargo-make/issues/212#issuecomment-481123564> |
| 56 | +[tasks.release-dry-run-INTERNAL] |
| 57 | +private = true |
| 58 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 59 | +env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = "integration_tests/*" } |
15 | 60 | description = "Run `cargo-release --dry-run` for every crate"
|
16 |
| -command = "${HOME}/src/cargo-release/target/debug/cargo-release" |
17 |
| -args = ["release", "--config", "../_build/release.toml", "--dry-run"] |
| 61 | +command = "cargo-release" |
| 62 | +args = ["release", "--config", "../_build/release.toml", "--dry-run", "${RELEASE_LEVEL}"] |
| 63 | + |
| 64 | +# |
| 65 | +# Run `RELEASE_LEVEL=(patch|major|minor) cargo make release-local-test` to do actually make changes locally but |
| 66 | +# not push them up to crates.io or Github. |
| 67 | +# Run `RELEASE_LEVEL=(patch|major|minor) cargo make release-some-local-test` to do actually make changes locally but |
| 68 | +# not push some crates up to crates.io or Github. |
| 69 | +# |
| 70 | + |
| 71 | +[tasks.release-local-test] |
| 72 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 73 | +workspace = false |
| 74 | +env = { "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS" = "integration_tests/*" } |
| 75 | +command = "cargo" |
| 76 | +args = [ "make", "release-local-test-INTERNAL" ] |
| 77 | + |
| 78 | +[tasks.release-some-local-test] |
| 79 | +condition = { env_set = [ "CARGO_MAKE_WORKSPACE_SKIP_MEMBERS", "RELEASE_LEVEL" ] } |
| 80 | +workspace = false |
| 81 | +command = "cargo" |
| 82 | +args = [ "make", "release-local-test-INTERNAL" ] |
| 83 | + |
| 84 | +# Hack to filter out crates we do not want to release. |
| 85 | +# See <https://github.com/sagiegurari/cargo-make/issues/212#issuecomment-481123564> |
| 86 | +[tasks.release-local-test-INTERNAL] |
| 87 | +private = true |
| 88 | +condition = { env_set = [ "RELEASE_LEVEL" ] } |
| 89 | +description = "Run `cargo-release` for every crate, but only make changes locally" |
| 90 | +command = "cargo-release" |
| 91 | +args = ["release", "--config", "../_build/release.toml", "--skip-publish", "--skip-push", "--skip-tag", "${RELEASE_LEVEL}"] |
0 commit comments