mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-09 12:21:57 -04:00
add release script
This commit is contained in:
parent
301e220c53
commit
dab97b0a5b
1 changed files with 16 additions and 8 deletions
|
@ -23,17 +23,25 @@ cd "$DIR"
|
||||||
OLD_VERSION="$(cat "$VERSION_FILE")"
|
OLD_VERSION="$(cat "$VERSION_FILE")"
|
||||||
NEW_VERSION="$(bump_semver "$OLD_VERSION")"
|
NEW_VERSION="$(bump_semver "$OLD_VERSION")"
|
||||||
|
|
||||||
if [ -z "$(git status --porcelain)" ]; then
|
|
||||||
echo "[*] Bumping VERSION from $OLD_VERSION to $NEW_VERSION"
|
|
||||||
echo "$NEW_VERSION" > "$VERSION_FILE"
|
|
||||||
else
|
|
||||||
echo "[X] Commit your changes and make sure the Git state is clean before proceeding."
|
|
||||||
exit 4
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[*] Fetching latest docs version"
|
echo "[*] Fetching latest docs version"
|
||||||
cd "$DIR/docs"
|
cd "$DIR/docs"
|
||||||
git pull
|
git pull
|
||||||
|
cd "$DIR"
|
||||||
|
|
||||||
|
if [ -z "$(git status --porcelain)" ] && [[ "$(git branch --show-current)" == "master" ]]; then
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
echo "[X] Commit your changes and make sure git is checked out on clean master."
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[*] Bumping VERSION from $OLD_VERSION to $NEW_VERSION"
|
||||||
|
echo "$NEW_VERSION" > "$VERSION_FILE"
|
||||||
|
git add "$NEW_VERSION"
|
||||||
|
git commit -m "$NEW_VERSION release"
|
||||||
|
git tag -a "$NEW_VERSION"
|
||||||
|
git push origin master
|
||||||
|
git push origin --tags
|
||||||
|
|
||||||
echo "[*] Cleaning up build dirs"
|
echo "[*] Cleaning up build dirs"
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue