More script tweaks regarding syncing with master
Ximin Luo
4 years ago
1 | 1 |
set -e
|
2 | 2 |
|
3 | 3 |
packages=( $(dev/list-pending-not-NEW.sh | dev/filter-package-in-debian.sh | grep -v ' 0$' | cut '-d ' -f1) )
|
|
4 |
|
|
5 |
if [ -z "$packages" ]; then exit 0; fi
|
4 | 6 |
set -x
|
|
7 |
|
|
8 |
git fetch origin --prune
|
|
9 |
git diff --quiet origin/master || \
|
|
10 |
{ echo >&2 "Please sync with origin/master before running this."; exit 1; }
|
5 | 11 |
|
6 | 12 |
git merge "${packages[@]/#/pending-}"
|
7 | 13 |
git push origin master "${packages[@]/#/:pending-}"
|
26 | 26 |
git fetch origin --prune
|
27 | 27 |
|
28 | 28 |
git diff --quiet origin/master || \
|
29 | |
abort 1 "You have unpushed changes on the master branch, please push or unwind them before running this script."
|
|
29 |
abort 1 "You are not synced with origin/master, please do so before running this script."
|
30 | 30 |
|
31 | 31 |
if head -n1 "$PKGDIR/debian/changelog" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
|
32 | 32 |
abort 0 "Package already released."
|