release.sh in percy-common-3.1.2.rc.1 vs release.sh in percy-common-3.1.2
- old
+ new
@@ -17,14 +17,17 @@
rm "$CURDIR/"percy-common*.gem >/dev/null 2>&1 || true
delete_existing_version() {
git tag -d "v$1" || true
git push origin ":v$1" || true
- gem yank "percy-common$1.gem" || true
+ gem yank percy-common -v "$1" || true
}
-if [[ $1 == 'delete' ]]; then
+if [[ $1 =~ ^.*delete$ ]]; then
+ shift
+ echo "Preparing to delete $1"
+ sleep 3
delete_existing_version "$PERCY_COMMON_VERSION"
else
CLEAN=$(
git diff-index --quiet HEAD --
echo $?
@@ -51,12 +54,12 @@
git tag -a "v$VERSION" -m "$1" || true
git push origin "v$VERSION" || true
bundle exec rake build
- gem push "$CURDIR/pkg/percy-common-$VERSION.gem"
+ gem push "$CURDIR/pkg/percy-common-"*.gem
open "https://github.com/percy/percy-common/releases/new?tag=v$VERSION&title=$VERSION"
- rm "$CURDIR/pkg/percy-common-$VERSION.gem"
+ rm "$CURDIR/pkg/percy-common-"*.gem
else
echo "Please commit your changes and try again"
exit 1
fi
fi