From e3cb158c8e04c661d101ce923edc01d21c943554 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Sat, 8 Jun 2024 08:54:05 +0800 Subject: [PATCH] Migrate stub binary tagging code to Xcode template. --- .github/workflows/update-binary.yml | 73 ----------------------------- stub/pyproject.toml | 16 ------- stub/src/console_stub/__init__.py | 0 stub/src/gui_stub/__init__.py | 0 4 files changed, 89 deletions(-) delete mode 100644 .github/workflows/update-binary.yml delete mode 100644 stub/pyproject.toml delete mode 100644 stub/src/console_stub/__init__.py delete mode 100644 stub/src/gui_stub/__init__.py diff --git a/.github/workflows/update-binary.yml b/.github/workflows/update-binary.yml deleted file mode 100644 index 9b412bb..0000000 --- a/.github/workflows/update-binary.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Update binary -on: - push: - tags: - - '*-b*' - -jobs: - build-stubs: - name: Build stub binaries - runs-on: macos-latest - strategy: - matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] - steps: - - name: Set Build Variables - env: - TAG_NAME: ${{ github.ref }} - run: | - export TAG=$(basename $TAG_NAME) - export PYTHON_TAG=$(python -c "print('.'.join('${{ matrix.python-version }}'.split('.')[:2]))") - export BRIEFCASE_VERSION="${TAG%-*}" - export BUILD_NUMBER="${TAG#*-}" - - echo "TAG=${TAG}" | tee -a $GITHUB_ENV - echo "PYTHON_TAG=${PYTHON_TAG}" | tee -a $GITHUB_ENV - echo "BRIEFCASE_VERSION=${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV - echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a $GITHUB_ENV - - - name: Checkout Template - uses: actions/checkout@v4.1.6 - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v5.1.0 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - if [ "${{ env.BRIEFCASE_VERSION }}" == "dev" ]; then - # We're on the development template; use development Briefcase - python -m pip install git+https://github.com/beeware/briefcase.git - else - python -m pip install briefcase==${{ env.BRIEFCASE_VERSION }} - fi - - - name: Generate Xcode App Template - run: | - # Generate the stub app - cd stub - briefcase build macOS Xcode - - echo "Build console stub artefact" - mv "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" Stub - codesign --remove-signature Stub - zip Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub - - echo "Build GUI stub artefact" - mv "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" Stub - codesign --remove-signature Stub - zip Console-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip Stub - - - name: Upload Release Asset to S3 - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - run: | - python -m pip install -U pip - python -m pip install -U setuptools - python -m pip install awscli - - 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 }}/macOS/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 }}/macOS/GUI-Stub-${{ env.PYTHON_TAG }}-${{ steps.build-vars.outputs.BUILD_NUMBER }}.zip diff --git a/stub/pyproject.toml b/stub/pyproject.toml deleted file mode 100644 index 978a925..0000000 --- a/stub/pyproject.toml +++ /dev/null @@ -1,16 +0,0 @@ -[tool.briefcase] -project_name = "Stub" -bundle = "org.beeware" -version = "1.0.0" -license.file = "../LICENSE" - -[tool.briefcase.app.gui-stub] -formal_name = "GUI Stub" -description = "A stub binary for GUI apps that can be integrated into the macOS app template" -sources = ['src/gui_stub'] - -[tool.briefcase.app.console-stub] -formal_name = "Console Stub" -description = "A stub binary for console apps that can be integrated into the macOS app template" -sources = ['src/console_stub'] -console_app = true diff --git a/stub/src/console_stub/__init__.py b/stub/src/console_stub/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/stub/src/gui_stub/__init__.py b/stub/src/gui_stub/__init__.py deleted file mode 100644 index e69de29..0000000