Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Changelog update and release script
Browse files Browse the repository at this point in the history
  • Loading branch information
10b14224cc committed Jan 6, 2022
1 parent 264637c commit 61bce32
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 13 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

v 1.1.2 (2022-01-06)
* Single source of truth for version
* Launcher for Windows
* Can specify options for Adobe Acrobat Clearscan simulation
* Additional options for Adobe Acrobat Clearscan simulation

v 1.1 (2021-11-25)
v 1.1.0 (2021-11-25)

* Can simulate Adobe Acrobat Clearscan (improve quality of scanned document)

Expand Down
2 changes: 1 addition & 1 deletion pdfsak_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env python3
__version__ = "1.1.1"
__version__ = "1.2.4"
72 changes: 72 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env bash

read -p "Insert version number in the form A.B.C: " ver

# Change version in configuration file
sed -i -E "s/[0-9]+\.[0-9]+\.[0-9]+/$ver/g" pdfsak_version.py

echo "Echoing pdfsak_version.py"
cat pdfsak_version.py
read -p "Does it look correct (y/n)? " ans

if [ "$ans" = "y" ]; then
echo "Answered yes. Proceeding."
elif [ "$ans" = "n" ]; then
echo "Answered no. Exiting"
exit
else
echo "Unrecognized answer"
fi

# Create commit for version bump

git add -A
git commit -m "Bump version to $ver"

echo "Echoing commit for version bump"
git diff HEAD^

read -p "Does it look correct (y/n)? " ans

if [ "$ans" = "y" ]; then
echo "Answered yes. Proceeding."
elif [ "$ans" = "n" ]; then
echo "Answered no. Exiting"
exit
else
echo "Unrecognized answer"
fi

# Create annotated tag for this version
git tag -a v$ver -m "Version $ver"

echo "Echoing git tags"
git tag --list

read -p "Does it look correct (y/n)? " ans

if [ "$ans" = "y" ]; then
echo "Answered yes. Proceeding."
elif [ "$ans" = "n" ]; then
echo "Answered no. Exiting"
exit
else
echo "Unrecognized answer"
fi

# Push commit
git push

# Push tag
git push origin v$ver

# Build project
rm -rf dist/
rm -rf build/
rm -rf *.egg-info
python3 -m build

# Upload to PyPI
python3 -m twine upload dist/*

echo "Done. Remember to release on GitHub"
9 changes: 0 additions & 9 deletions upload_to_pypi.sh

This file was deleted.

0 comments on commit 61bce32

Please sign in to comment.