Skip to content

Commit

Permalink
Script issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cdgriffith committed Aug 9, 2024
1 parent 910d5f8 commit 1f6ca22
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
mkdir dist
echo "::set-env name=VERSION::$(python scripts/get_version.py)"
echo "::set-env name=ARCH::$(python scripts/get_arch.py)"
echo "Building branch ${{env.GITHUB_REF}} - version ${{env.VERSION}} - on ${{env.ARCH}}"
echo "Building branch ${{ env.GITHUB_REF }} - version ${{ env.VERSION }} - on ${{ env.ARCH }}"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Build Mac App
if : ${{ startsWith(matrix.os, 'macos') }}
run: python scripts/build_mac_app.py "${{ matrix.os }}"
run: python scripts/build_mac_app.py ${{ matrix.os }}

- name: Upload Mac App artifact
if : ${{ startsWith(matrix.os, 'macos') }}
Expand Down
8 changes: 6 additions & 2 deletions scripts/build_mac_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
resources_folder = content_folder / "Resources"
resources_folder.mkdir(exist_ok=True)

mac_version = f"{sys.argv[1].split(" - ")[1]}.0"
assert mac_version in ("12.0", "13.0", "14.0", "15.0")
try:
mac_version = f"{sys.argv[1].split(" - ")[1]}.0"
assert mac_version in ("12.0", "13.0", "14.0", "15.0")
except Exception:
print(f"Did not get expected input, received: {sys.argv}")
sys.exit(1)

with open(plist_template) as in_file, open(content_folder / "Info.plist", "w") as out_file:
template = in_file.read().format(version=__version__, mac_version=mac_version)
Expand Down

0 comments on commit 1f6ca22

Please sign in to comment.