Skip to content

Commit

Permalink
Add SDK branch clones from other branches, resolves #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Randomblock1 authored Mar 13, 2024
1 parent 3cdf226 commit da432cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You must use a MacOS or Linux runner. Windows is not supported, and probably nev
```bash
- uses: Randomblock1/theos-action@v1
with:
# Defaults are filled in below.
# All of these are optional. Defaults are filled in below.

# This is where Theos is downloaded to.
theos-dir: 'theos'
Expand All @@ -29,7 +29,10 @@ You must use a MacOS or Linux runner. Windows is not supported, and probably nev
# Useful for using frameworks that aren't in the official repo.
theos-sdks: 'https://github.com/theos/sdks'

# Whether to enable Orion, which adds support for Swift tweaks
# Which branch to clone from theos-sdks repo.
theos-sdks-branch: 'master'

# Whether to enable Orion, which adds support for tweaks coded in Swift
orion: 'false'
```

Expand Down
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
description: "Where to clone the iOS SDKs from (GitHub repository URL)"
required: false
default: "https://github.com/theos/sdks"
theos-sdks-branch:
description: "Which branch to clone from SDK repo"
required: false
default: "master"
orion:
description: "Whether to enable Orion, which adds support for Swift tweaks"
required: false
Expand Down Expand Up @@ -72,11 +76,11 @@ runs:
echo "Theos SDKs already cached, skipping..."
else
cd ${{ inputs.theos-dir }}/sdks
wget --no-verbose ${{ inputs.theos-sdks }}/archive/master.zip
wget --no-verbose ${{ inputs.theos-sdks }}/archive/${{ inputs.theos-sdks-branch }}.zip
TMP=$(mktemp -d)
7z x master.zip -o$TMP
mv $TMP/*-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
7z x ${{ inputs.theos-sdks-branch }}.zip -o$TMP
mv $TMP/*-${{ inputs.theos-sdks-branch }}/*.sdk $THEOS/sdks
rm -r ${{ inputs.theos-sdks-branch }}.zip $TMP
fi
- name: Enable Orion
Expand Down

0 comments on commit da432cb

Please sign in to comment.