diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /src/tools/cargo/ci | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/ci')
-rwxr-xr-x | src/tools/cargo/ci/validate-version-bump.sh | 45 |
1 files changed, 3 insertions, 42 deletions
diff --git a/src/tools/cargo/ci/validate-version-bump.sh b/src/tools/cargo/ci/validate-version-bump.sh index 9b54fdaaf..659b54c0e 100755 --- a/src/tools/cargo/ci/validate-version-bump.sh +++ b/src/tools/cargo/ci/validate-version-bump.sh @@ -16,46 +16,7 @@ set -euo pipefail base_sha=$(git rev-parse "${BASE_SHA:-HEAD~1}") head_sha=$(git rev-parse "${HEAD_SHA:-HEAD}") -echo "Base branch is $base_sha" -echo "Current head is $head_sha" +echo "Base revision is $base_sha" +echo "Head revision is $head_sha" -# Gets crate names of members that has been changed from $bash_sha to $head_sha. -changed_crates=$( - git diff --name-only "$base_sha" "$head_sha" -- crates/ credential/ benches/ \ - | cut -d'/' -f2 \ - | sort -u -) - -if [ -z "$changed_crates" ] -then - echo "No file changed in member crates." - exit 0 -fi - -# Checks publish status for only crates with code changes. -publish_status_table=$( - echo "$changed_crates" \ - | xargs printf -- '--package %s\n' \ - | xargs cargo unpublished -) - -# "yes" -> code changed but no version difference -> need a bump -# Prints 2nd column (sep by space), which is the name of the crate. -crates_need_bump=$( - echo "$publish_status_table" \ - | { grep '| yes ' || true; } \ - | awk '{print $2}' -) - -if [ -z "$crates_need_bump" ] -then - echo "No version bump needed for member crates." - exit 0 -fi - -echo "Detected changes in these crates but no version bump found:" -echo "$crates_need_bump" -echo -echo "Please bump at least one patch version for each corresponding Cargo.toml:" -echo 'Run "cargo unpublished" to read the publish status table for details.' -exit 1 +cargo bump-check --base-rev "$base_sha" --head-rev "$head_sha" |