Skip to content

Commit

Permalink
Prepare to package app for release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Brunel authored and Olivier Brunel committed May 2, 2020
1 parent c437e04 commit a87a14b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ __pycache__
isItFramedOk.jpg
build
dist
photoframer*.tar.gz
*.spec
Empty file added RELEASE.md
Empty file.
48 changes: 48 additions & 0 deletions create_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/sh

if [ -z "$1" ]; then
echo "Usage: $0 version";
exit 1;
fi;

set -x
set -v

# Get version from script arguments
version = $1

echo "Clean up before packaging"
rm -rf frame.spec
rm -rf test.spec
rm -rf dist
rm -rf build

echo "Create frame.py executable"
pyinstaller frame.py
pyinstaller frame.spec

echo "Create test.py executable"
pyinstaller test.py
pyinstaller test.spec

echo "Include RELEASE.md file"
cp RELEASE.md dist/

tarballdirname = photoframer-$version
echo "Prepare to create the tarball from dir $tarballdirname/"
mv dist $tarballname

tarballname = $tarballdirname.tar.gz
echo "Create the tarball $tarballname"
tar -cvzf $tarballname.tar.gz $tarballdirname

echo "Create version git tag if result tarball exists"
if [ -f "$tarballname" ]; then
git tag
fi

echo "Clean up after itself"
rm -rf frame.spec
rm -rf test.spec
rm -rf dist
rm -rf build

0 comments on commit a87a14b

Please sign in to comment.