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

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

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

Loading…
Cancel
Save