mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 20:23:12 +00: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")"
|
||||
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"
|
||||
cd "$DIR/docs"
|
||||
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"
|
||||
cd "$DIR"
|
||||
|
|
Loading…
Reference in a new issue