1
1
sovereign-stack/publish.sh

27 lines
804 B
Bash
Raw Permalink Normal View History

2022-12-26 15:31:09 +00:00
#!/bin/bash
2023-03-06 20:42:17 +00:00
set -eu
2022-12-26 15:31:09 +00:00
cd "$(dirname "$0")"
# this script will tag the repo then push it to origin
TAG_NAME="$(head -n 1 ./version.txt)"
TAG_MESSAGE="Creating tag $TAG_NAME on $(date)."
2023-03-06 17:56:35 +00:00
# create the git tag.
if ! git tag | grep -q "$TAG_NAME"; then
git tag -a "$TAG_NAME" -m "$TAG_MESSAGE" -s
fi
2022-12-26 15:31:09 +00:00
2023-01-05 16:14:48 +00:00
# push commits and tags to origin
git push --set-upstream origin --all
git push --set-upstream origin --tags
2023-01-05 16:14:48 +00:00
## note this will only work if you have permissions to update HEAD on https://git.sovereign-stack.org/ss/sovereign-stack.git
RESPONSE=
2023-03-06 17:54:25 +00:00
read -r -p " Would you like to push this to the main Sovereign Stack repo? (y) ": RESPONSE
2023-03-06 17:56:35 +00:00
if [ "$RESPONSE" = "y" ]; then
# optional; push to remote
git push --set-upstream ss-upstream --all
git push --set-upstream ss-upstream --tags
fi