-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from beeware/console-app
Modify stub handling to allow for console and GUI stubs
- Loading branch information
Showing
19 changed files
with
76 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,18 +49,20 @@ jobs: | |
# Generate the stub app | ||
cd stub | ||
briefcase build macOS Xcode | ||
# Since it's a generic stub binary, we can't provide any meaningful | ||
# signing credentials in the Xcode project. Remove the signature from | ||
# the stub binary. | ||
codesign --remove-signature ./build/stub/macos/xcode/build/Release/Stub.app/Contents/MacOS/Stub | ||
echo "Move the binary into the final location" | ||
mv ./build/stub/macos/xcode/build/Release/Stub.app/Contents/MacOS/Stub Stub-${{ env.PYTHON_TAG }} | ||
# Since the project is producing generic stub binary, we can't provide | ||
# any meaningful signing credentials in the Xcode project. Remove the | ||
# signature from the stub binaries. | ||
codesign --remove-signature "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" | ||
codesign --remove-signature "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" | ||
echo "Move the binaries into the final location" | ||
mv "./build/console-stub/macos/xcode/build/Release/Console Stub.app/Contents/MacOS/Console Stub" Console-Stub-${{ env.PYTHON_TAG }} | ||
mv "./build/gui-stub/macos/xcode/build/Release/GUI Stub.app/Contents/MacOS/GUI Stub" GUI-Stub-${{ env.PYTHON_TAG }} | ||
- name: Upload Stub Artefact | ||
uses: actions/[email protected] | ||
with: | ||
name: stub-${{ matrix.python-version }} | ||
path: stub/Stub-${{ env.PYTHON_TAG }} | ||
path: stub/*-Stub-${{ env.PYTHON_TAG }} | ||
|
||
commit-stubs: | ||
name: Commit stub binaries | ||
|
@@ -75,23 +77,15 @@ jobs: | |
export BRIEFCASE_VERSION="${TAG%-*}" | ||
export BUILD_NUMBER="${TAG#*-}" | ||
echo "TAG=${TAG}" | ||
echo "PYTHON_TAG=${PYTHON_TAG}" | ||
echo "BRIEFCASE_VERSION=${BRIEFCASE_VERSION}" | ||
echo "BUILD_NUMBER=${BUILD_NUMBER}" | ||
echo "TAG=${TAG}" >> $GITHUB_ENV | ||
echo "PYTHON_TAG=${PYTHON_TAG}" >> $GITHUB_ENV | ||
echo "BRIEFCASE_VERSION=${BRIEFCASE_VERSION}" >> $GITHUB_ENV | ||
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> $GITHUB_ENV | ||
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" | ||
echo "TEMPLATE_BRANCH=main" >> $GITHUB_ENV | ||
echo "TEMPLATE_BRANCH=main" | tee -a $GITHUB_ENV | ||
else | ||
echo "TEMPLATE_BRANCH=v${BRIEFCASE_VERSION}" | ||
echo "TEMPLATE_BRANCH=v${BRIEFCASE_VERSION}" >> $GITHUB_ENV | ||
echo "TEMPLATE_BRANCH=v${BRIEFCASE_VERSION}" | tee -a $GITHUB_ENV | ||
fi | ||
- name: Checkout Template | ||
|
@@ -109,12 +103,12 @@ jobs: | |
git config user.email "[email protected]" | ||
git config user.name "Brutus (robot)" | ||
# Move the binary into it's final location | ||
mv stub/Stub-* "{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS" | ||
mv stub/*-Stub-* "{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS" | ||
# Ensure the binary is executable | ||
cd "{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS" | ||
chmod 755 Stub-* | ||
chmod 755 *-Stub-* | ||
# Commit changes | ||
git add ./Stub-* | ||
git add ./*-Stub-* | ||
git commit -m "AUTO: Update app binaries; build ${{ env.TAG }}" | ||
git push origin HEAD:${{ env.TEMPLATE_BRANCH }} | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="no"?> | ||
<installer-script minSpecVersion="1.000000"> | ||
<title>{{ cookiecutter.formal_name }}</title> | ||
<welcome file="welcome.html" mime-type="text/html" /> | ||
<license file="LICENSE" mime-type="text/plain" /> | ||
<options customize="never" allow-external-scripts="no"/> | ||
<domains enable_localSystem="true" /> | ||
<choices-outline> | ||
<line choice="{{ cookiecutter.app_name }}"/> | ||
</choices-outline> | ||
<choice id="{{ cookiecutter.app_name }}" title="{{ cookiecutter.app_name }}"> | ||
<pkg-ref id="{{ cookiecutter.app_name }}.pkg"/> | ||
</choice> | ||
<pkg-ref id="{{ cookiecutter.app_name }}.pkg" auth="Root">{{ cookiecutter.app_name }}.pkg</pkg-ref> | ||
</installer-script> |
15 changes: 15 additions & 0 deletions
15
{{ cookiecutter.format }}/installer/resources/welcome.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<style> | ||
* { | ||
font-family: sans-serif; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>{{ cookiecutter.formal_name }} {{ cookiecutter.version }}</h1> | ||
<p>This installer will guide you through the steps necessary to install {{ cookiecutter.formal_name }}.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
echo "Post installation process started" | ||
|
||
echo "Install binary symlink" | ||
ln -si "/Library/{{ cookiecutter.formal_name }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/{{ cookiecutter.formal_name }}" /usr/local/bin/{{ cookiecutter.app_name }} | ||
|
||
echo "Post installation process finished" |
Binary file added
BIN
+6.99 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.10
Binary file not shown.
Binary file added
BIN
+10.1 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.11
Binary file not shown.
Binary file added
BIN
+12.6 MB
...ookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.12
Binary file not shown.
Binary file added
BIN
+6.47 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.8
Binary file not shown.
Binary file added
BIN
+6.96 MB
{{ cookiecutter.format }}/{{ cookiecutter.formal_name }}.app/Contents/MacOS/Console-Stub-3.9
Binary file not shown.
Binary file renamed
BIN
+7.04 MB
...rmal_name }}.app/Contents/MacOS/Stub-3.10 → ..._name }}.app/Contents/MacOS/GUI-Stub-3.10
Binary file not shown.
Binary file renamed
BIN
+10.2 MB
...rmal_name }}.app/Contents/MacOS/Stub-3.11 → ..._name }}.app/Contents/MacOS/GUI-Stub-3.11
Binary file not shown.
Binary file renamed
BIN
+12.6 MB
...rmal_name }}.app/Contents/MacOS/Stub-3.12 → ..._name }}.app/Contents/MacOS/GUI-Stub-3.12
Binary file not shown.
Binary file renamed
BIN
+6.51 MB
...ormal_name }}.app/Contents/MacOS/Stub-3.8 → ...l_name }}.app/Contents/MacOS/GUI-Stub-3.8
Binary file not shown.
Binary file renamed
BIN
+6.98 MB
...ormal_name }}.app/Contents/MacOS/Stub-3.9 → ...l_name }}.app/Contents/MacOS/GUI-Stub-3.9
Binary file not shown.