diff options
Diffstat (limited to 'scripts/release')
| -rwxr-xr-x | scripts/release | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/scripts/release b/scripts/release index b88d2a5..e10d862 100755 --- a/scripts/release +++ b/scripts/release @@ -23,8 +23,9 @@ # # With --dry-run, it checks and says what it would write; it, or a check failing, leaves # the tree as it was. -# CONTINUUM_FEATURES are the features it builds with, a transport among them -# (federation,mycelium unless given). +# CONTINUUM_FEATURES are the features it builds with, a transport among them, unless +# given: this tree with `most`, as development builds, the last release with it too +# where it has it, else with the features it stands for. set -eu @@ -50,7 +51,16 @@ leading() { } cd "$(git rev-parse --show-toplevel)" -features=${CONTINUUM_FEATURES:-federation,mycelium} +# The features tag $1 builds with: `most` where it has that feature, else the ones `most` +# stands for, which a tag before it has. +features_of() { + if git show "$1:Cargo.toml" 2>/dev/null | grep -q "^most = "; then + echo most + else + echo dashboard,federation,libp2p,mycelium,tor + fi +} +features=${CONTINUUM_FEATURES:-most} cache=${XDG_CACHE_HOME:-$HOME/.cache} target=${CONTINUUM_RELEASE_TARGET:-$cache/continuum/release} @@ -97,9 +107,9 @@ esac # 3. How it upgrades from the last release. speaks() { - cargo run -q --features "$features" --bin continuum -- --version + cargo run -q --features "$1" --bin continuum -- --version } -here=$(speaks) +here=$(speaks "$features") field() { echo "$1" | sed -n "s/^$2 //p" | head -n 1; } here_wire=$(field "$here" "wire versions") here_automerge=$(field "$here" automerge) @@ -112,7 +122,7 @@ newest_revision() { here_revisions=$(newest_revision "$here") if [ -n "$last" ]; then git worktree add -q --detach "$work/last" "$last" - there=$(cd "$work/last" && CARGO_TARGET_DIR=$target speaks) + there=$(cd "$work/last" && CARGO_TARGET_DIR=$target speaks "${CONTINUUM_FEATURES:-$(features_of "$last")}") there_wire=$(field "$there" "wire versions") there_automerge=$(field "$there" automerge) there_federation=$(echo "$there" | sed -n 's/^federation \([0-9]*\): .*/\1/p') |
