This commit is contained in:
GrantBirki 2023-08-29 13:58:39 -06:00
Родитель d9ef9258a2
Коммит b42648b701
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9029BBCCC15C6F8C
1 изменённых файлов: 0 добавлений и 42 удалений

Просмотреть файл

@ -1,42 +0,0 @@
#!/bin/bash
# Tag and push a release.
set -e
set -x
# Make sure we're in the project root.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd ${DIR}
# Build a new gem archive.
rm -rf entitlements-*.gem
GEM_NAME='entitlements' gem build -q entitlements-app.gemspec
gem build -q entitlements-app.gemspec
# Make sure we're on the main branch.
(git branch --no-color | grep -q '* main') || {
echo "Only release from the main branch."
exit 1
}
# Figure out what version we're releasing.
tag=v`ls entitlements-app-*.gem | sed 's/^entitlements-app-\(.*\)\.gem$/\1/'`
# Make sure we haven't released this version before.
git fetch -t origin
(git tag -l | grep -q "$tag") && {
echo "Whoops, there's already a '${tag}' tag."
exit 1
}
# Tag it and bag it.
gem push entitlements-app-*.gem && rm -f entitlements-app-*.gem
gem push entitlements-*.gem && rm -f entitlements-*.gem
git tag "$tag" && git push origin main && git push origin "$tag"