mirror of
https://git.proxmox.com/git/debcargo-conf
synced 2025-04-28 14:41:20 +00:00
release.sh: Don't create a new branch if already released on current branch
This commit is contained in:
parent
32c1fb5be1
commit
2de6944f25
@ -10,6 +10,11 @@ abort 1 "Please git-add your changes to $PKGDIR_REL before running"
|
||||
|
||||
RELBRANCH="pending-$PKGNAME"
|
||||
git fetch origin --prune
|
||||
|
||||
if head -n1 "$PKGDIR/debian/changelog" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
|
||||
abort 0 "Package already released."
|
||||
fi
|
||||
|
||||
PREVBRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
case "$PREVBRANCH" in
|
||||
pending-$PKGNAME) true;;
|
||||
@ -24,7 +29,7 @@ esac
|
||||
|
||||
if head -n1 "$PKGDIR/debian/changelog" | grep -qv UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then
|
||||
git checkout "$PREVBRANCH"
|
||||
abort 0 "Package already released. If that was a mistake then run \`git branch -D $RELBRANCH\`, and re-run this script ($0 $*)"
|
||||
abort 0 "Package already released on branch $RELBRANCH. If that was a mistake then run \`git branch -D $RELBRANCH\`, and re-run this script ($0 $*)"
|
||||
fi
|
||||
|
||||
( cd "$PKGDIR"
|
||||
|
Loading…
Reference in New Issue
Block a user