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