Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stub binaries from app template #51

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 15 additions & 50 deletions .github/workflows/update-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,58 +53,23 @@ jobs:
# Generate the stub app
cd stub
briefcase build windows visualstudio
echo "Move the binaries into the final location"
mv ./build/console-stub/windows/visualstudio/x64/Release/console-stub.exe ./Console-Stub-${{ env.PYTHON_TAG }}.exe
mv "./build/gui-stub/windows/visualstudio/x64/Release/GUI stub.exe" ./GUI-Stub-${{ env.PYTHON_TAG }}.exe
- name: Upload Stub Artefact
uses: actions/[email protected]
with:
name: stub-${{ matrix.python-version }}
path: stub/*-Stub-${{ env.PYTHON_TAG }}.exe
echo "Build console stub artefact"
mv "./build/console-stub/windows/visualstudio/x64/Release/Console Stub.exe" ./Stub.exe
zip Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub.exe
commit-stubs:
name: Commit Stub Binaries
needs: build-stubs
runs-on: windows-latest
steps:
- name: Set Build Variables
echo "Build GUI stub artefact"
mv "./build/gui-stub/windows/visualstudio/x64/Release/GUI Stub.exe" ./Stub.exe
zip GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub.exe
- name: Upload Release Asset to S3
env:
TAG_NAME: ${{ github.ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
export TAG=$(basename $TAG_NAME)
export BRIEFCASE_VERSION="${TAG%-*}"
export BUILD_NUMBER="${TAG#*-}"
python -m pip install -U pip
python -m pip install -U setuptools
python -m pip install awscli
echo "TAG=${TAG}" | tee -a $GITHUB_ENV
echo "BRIEFCASE_VERSION=${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a $GITHUB_ENV
if [ "${BRIEFCASE_VERSION}" == "dev" ]; then
# We're on the development template; push to main
echo "TEMPLATE_BRANCH=main" | tee -a $GITHUB_ENV
else
echo "TEMPLATE_BRANCH=v${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV
fi
- name: Checkout Template
uses: actions/[email protected]

- name: Download Stub Artefacts
uses: actions/[email protected]
with:
pattern: stub-*
path: stub
merge-multiple: true

- name: Commit Stubs
run: |
git config user.email "[email protected]"
git config user.name "Brutus (robot)"
# Move the binaries into their final location
mv stub/*-Stub-* "{{ cookiecutter.format }}/src"
git add "{{ cookiecutter.format }}/src"
git commit -m "AUTO: Update app binaries; build ${{ env.TAG }}"
git push origin HEAD:${{ env.TEMPLATE_BRANCH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
aws s3 cp stub/Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ steps.build-vars. outputs.PY_VERSION }}/windows/Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip
aws s3 cp stub/GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip s3://briefcase-support/python/${{ steps.build-vars.outputs.PY_VERSION }}/windows/GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip
15 changes: 0 additions & 15 deletions hooks/post_gen_project.py

This file was deleted.

2 changes: 1 addition & 1 deletion {{ cookiecutter.format }}/briefcase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ support_path = "src"
"3.11": "support_revision = 7",
"3.12": "support_revision = 1",
}.get(cookiecutter.python_version|py_tag, "") }}

stub_binary_revision = 5
icon = "icon.ico"
Binary file removed {{ cookiecutter.format }}/src/Console-Stub-3.10.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/Console-Stub-3.11.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/Console-Stub-3.12.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/Console-Stub-3.8.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/Console-Stub-3.9.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/GUI-Stub-3.10.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/GUI-Stub-3.11.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/GUI-Stub-3.12.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/GUI-Stub-3.8.exe
Binary file not shown.
Binary file removed {{ cookiecutter.format }}/src/GUI-Stub-3.9.exe
Binary file not shown.