forked from alichtman/shallow-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# Release script for shallow-backup | ||
|
||
# Must be run from project root directory | ||
SB_VERSION="v$(python3 -c "from shallow_backup.constants import ProjInfo; print(ProjInfo.VERSION)")" | ||
SB_VERSION_NO_V="$(python3 -c "from shallow_backup.constants import ProjInfo; print(ProjInfo.VERSION)")" | ||
|
||
read -r -p "Release shallow-backup $SB_VERSION? [y/N] " response | ||
case "$response" in | ||
[yY][eE][sS]|[yY]) | ||
echo "Releasing." | ||
;; | ||
*) | ||
echo "Aborting." | ||
exit; | ||
;; | ||
esac | ||
|
||
git checkout master && git pull | ||
git tag -a "$SB_VERSION" -m "shallow-backup $SB_VERSION" && git push | ||
github_changelog_generator --user alichtman --project shallow-backup | ||
ga . && gc -m "Add CHANGELOG for $SB_VERSION" && git push | ||
rm -rf dist/* && python3 setup.py sdist | ||
hub release create $SB_VERSION --file dist/shallow-backup-$SB_VERSION_NO_V.tar.gz -m "shallow-backup $SB_VERSION" | ||
pypiup |