From a4027c79049838e425bc83d4096ef32179595d5a Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 9 Jul 2019 19:29:52 -0700 Subject: [PATCH] Switch back to Semver for 2.3.0 (#488) versioning: switch back to semver for 2.3.0, manual version updates - rename update-version.sh -> update-tag.sh to push tag for existing versions - bump version to 2.3.0 for release --- CHANGES.rst | 1 + pywb/version.py | 5 ++++- update-tag.sh | 16 ++++++++++++++++ update-version.sh | 27 --------------------------- 4 files changed, 21 insertions(+), 28 deletions(-) create mode 100755 update-tag.sh delete mode 100755 update-version.sh diff --git a/CHANGES.rst b/CHANGES.rst index 50111d50..caa2abcb 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,7 @@ pywb 2.3.x changelist - Fixes to ``this`` proxy rewrite to include ``, this`` * Misc Changes: + - Versioning: switched back to semver to more easily keep track of versions (#488) - Improved handling of open http connections and file handles (#463) - Fixes for latest urllib3, not verifying SSL certs (#467), (#469) - Better logging for invalid cdxlines and cookies (#477), (#478) diff --git a/pywb/version.py b/pywb/version.py index 4c42f779..5d0e55bc 100644 --- a/pywb/version.py +++ b/pywb/version.py @@ -1 +1,4 @@ -__version__ = '2.3.0.dev0' +__version__ = '2.3.0' + +if __name__ == '__main__': + print(__version__) diff --git a/update-tag.sh b/update-tag.sh new file mode 100755 index 00000000..9e56d869 --- /dev/null +++ b/update-tag.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +VERSION=$(python ./pywb/version.py) + +TAG=v-$VERSION + +echo "Committing Tag $TAG" + +if [ "$1" != "commit" ]; then + exit 0 +fi + +# Tag +git tag $TAG +git push origin $TAG + diff --git a/update-version.sh b/update-version.sh deleted file mode 100755 index c29ef02e..00000000 --- a/update-version.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -BASE=2.2 - -NOW=$(date +%Y%m%d) - -VERSION="$BASE.$NOW" - -# Update -echo "Updating version to $VERSION" -sed -i='' -E "s/(__version__ = ').*$/\1$VERSION'/" ./pywb/version.py - -if [ "$1" != "commit" ]; then - exit 0 -fi - -TAG=v-$VERSION - -echo "Committing Tag $TAG" - -git commit -m "version: update to $VERSION" ./pywb/version.py -git push - -# Tag -git tag $TAG -git push origin $TAG -