Codebase list rust-libslirp / 30bf7f2
release.sh: always try to fix the copyright years Ximin Luo 4 years ago
1 changed file(s) with 12 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
3636 if [ "$RERELEASE" = 1 ]; then
3737 run_debcargo
3838 ( cd "$PKGDIR" && dch -a "No-op source-only re-upload for Debian Testing Migration." )
39 # sometimes the copyright years need to be updated, try to do this automatically
40 if git diff -- "$PKGDIR_REL/debian/copyright.debcargo.hint" | patch --no-backup-if-mismatch "$PKGDIR_REL/debian/copyright"; then
41 git add "$PKGDIR_REL/debian/copyright.debcargo.hint" "$PKGDIR_REL/debian/copyright"
42 export REUSE_EXISTING_ORIG_TARBALL=1
43 else
44 git diff -- "$PKGDIR_REL/debian/copyright.debcargo.hint"
45 abort 1 \
46 "copyright file needs updating; apply the above diff to $PKGDIR_REL/debian/copyright" \
47 "then commit your changes, and run me again."
48 fi
39 export REUSE_EXISTING_ORIG_TARBALL=1
4940 else
5041 abort 0 \
5142 "Package already released. If you want to do a source-only re-upload e.g. to" \
10192 abort 1 "Release attempt failed to run debcargo, probably the package needs updating (./update.sh $*)"
10293 fi
10394
95 # sometimes the copyright years need to be updated, try to do this automatically
96 if git diff -- "$PKGDIR_REL/debian/copyright.debcargo.hint" | patch -r - --no-backup-if-mismatch "$PKGDIR_REL/debian/copyright"; then
97 git add "$PKGDIR_REL/debian/copyright.debcargo.hint" "$PKGDIR_REL/debian/copyright"
98 else
99 git diff -- "$PKGDIR_REL/debian/copyright.debcargo.hint"
100 revert_git_changes
101 abort 1 \
102 "copyright file needs updating; apply the above diff to $PKGDIR_REL/debian/copyright" \
103 "then commit your changes, and run me again."
104 fi
105
104106 if ! git diff --exit-code -- "$PKGDIR_REL"; then
105107 revert_git_changes
106108 abort 1 \