]> git.proxmox.com Git - rustc.git/blobdiff - debian/update-version.sh
bump version to 1.76.0+dfsg1-1~bpo12+pve1
[rustc.git] / debian / update-version.sh
index 512e7c1f0b90eb6155faec697dea16adc9898060..1d510ab360e0a1ee71859cc85728632cac36a2ee 100755 (executable)
@@ -6,21 +6,14 @@ local V=$1
 python3 -c 'import sys; k=list(map(int,sys.argv[1].split("."))); k[1]-=1; print(".".join(map(str,k)))' "$V"
 }
 
-cargo_new() {
-local V=$1
-python3 -c 'import sys; k=list(map(int,sys.argv[1].split("."))); k[1]+='"${2:-1}"'; k[0]-=1; print(".".join(map(str,k)))' "$V"
-}
-
 update() {
 local ORIG=$1 NEW=$2 NEW_LONG=$3
-local CARGO_NEW=${4:-$(cargo_new $NEW)}
-local CARGO_NEXT=${4:-$(cargo_new $NEW 2)}
 
 ORIG_M1=$(prev_stable $ORIG)
 NEW_M1=$(prev_stable $NEW)
 ORIG_R="${ORIG/./\\.}" # match a literal dot, otherwise this might sometimes match e.g. debhelper (>= 9.20141010)
 
-WASI_CI="$(grep -Rl "git clone https://github.com/CraneStation/wasi-libc" ../src/ci | head -n1)"
+WASI_CI="$(grep -Rl "git clone https://github.com/WebAssembly/wasi-libc" ../src/ci | head -n1)"
 WASI_COMMIT="$(egrep -o '\b[0-9A-Fa-f]{7}' "$WASI_CI")"
 WASI_REGEX='wasi-libc \(([><=]+) 0.0~git([0-9]+).([0-9a-f]+)([~+]+)\)'
 
@@ -38,8 +31,7 @@ fi
 sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" \
        -e "s|rustc:native\( *\)(<= [^)]*)|rustc:native\1(<= $NEW_LONG++)|g" \
        -e "s|rustc:native\( *\)(>= ${ORIG_M1/./\\.}|rustc:native\1(>= ${NEW_M1}|g" \
-       -e "s|cargo\( *\)(>= [^)]*)|cargo\1(>= ${CARGO_NEW}.0~~)|g" \
-       -e "s|cargo\( *\)(<< [^)]*)|cargo\1(<< ${CARGO_NEXT}.0~~)|g" \
+       -e "s|cargo:native\( *\)(>= ${ORIG_M1/./\\.}|cargo:native\1(>= ${NEW_M1}|g" \
        control
 
 if [ "$WASI_COMMIT" != "$WASI_COMMIT_OLD" ]; then
@@ -49,6 +41,8 @@ if [ "$WASI_COMMIT" != "$WASI_COMMIT_OLD" ]; then
 fi
 
 if [ "$NEW" != "$ORIG" ]; then
+git mv libstd-rust-$ORIG.install libstd-rust-$NEW.install
+git mv libstd-rust-$ORIG.triggers libstd-rust-$NEW.triggers
 git mv libstd-rust-$ORIG.lintian-overrides libstd-rust-$NEW.lintian-overrides
 fi
 sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" libstd-rust-$NEW.lintian-overrides