fix(scripts/git-tag-history): check for diff before modifying

pull/152/head
Joseph Werle 2 years ago
parent c28f420581
commit 6cdcebb9d4

@ -15,14 +15,17 @@ for tag in "${tags[@]}"; do
## set versions in files
sed -i "$regex" bpkg.sh
sed -i "$regex" setup.sh
## remove current tag
git tag -d "$tag"
## amend HEAD for current tag
git commit -a --amend --no-edit
## retag
git tag "$tag"
## force push update
git push origin "$tag" -f
if ! git diff --exit-code; then
## remove current tag
git tag -d "$tag"
## amend HEAD for current tag
git commit -a --amend --no-edit
## retag
git tag "$tag"
## force push update
git push origin "$tag" -f
fi
done
git checkout master

Loading…
Cancel
Save