Skip to content

Commit

Permalink
use ./scripts/build-binary.sh for all automated builds
Browse files Browse the repository at this point in the history
  • Loading branch information
n8marti committed Oct 21, 2024
1 parent 4dfa834 commit 7aa7b63
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Build with pyinstaller
id: pyinstaller
run: |
pyinstaller ou_dedetai.spec --clean
./scripts/build-binary.sh
echo "bin_name=oudedetai" >> $GITHUB_OUTPUT
- name: Upload artifact
Expand Down
9 changes: 6 additions & 3 deletions scripts/build-binary.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
start_dir="$PWD"
script_dir="$(dirname "$0")"
repo_root="$(dirname "$script_dir")"
cd "$repo_root"
if ! which pyinstaller >/dev/null 2>&1; then
echo "Error: Need to install pyinstaller; e.g. 'pip3 install pyinstaller'"
exit 1
# Install build deps.
python3 -m pip install .[build]
fi
python3 -m PyInstaller --clean "${repo_root}/ou_dedetai.spec"
pyinstaller --clean --log-level DEBUG ou_dedetai.spec
cd "$start_dir"
4 changes: 2 additions & 2 deletions scripts/run_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"""
import re
import sys
import ou_dedetai
import ou_dedetai.main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(ou_dedetai.main())
sys.exit(ou_dedetai.main.main())

0 comments on commit 7aa7b63

Please sign in to comment.