refactor: fix gh cli exit code 1 & use pyzule instead of azule and patcher (#11)

* feat: use pyzule instead of azule

* fix: gh cli throws and exits workflow

* fix: gh cli throws and exits workflow

* feat: get rid of go patcher

* chore: cleanup

* chore: adjust

* chore: cleanup

* chore: trollstore deep link

* chore: add trollstore deep link

* chore: improvement

* chore: additional useful information

* chore: grammar

* chore: cleanup
This commit is contained in:
Adrian Castro 2024-07-01 13:03:13 +02:00 • committed by GitHub
parent 3b37dcec64
commit f42db38302
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 51 deletions

View file

@ -24,17 +24,22 @@ jobs:
- name: Download Tweak - name: Download Tweak
run: | run: |
set -e set +e
release_info=$(gh api --header 'Accept: application/vnd.github+json' repos/${{ github.repository }}/releases/latest) release_info=$(gh api --header 'Accept: application/vnd.github+json' repos/${{ github.repository }}/releases/latest)
status_code=$(echo $release_info | jq -r ".status") status_code=$(echo $release_info | jq -r ".status")
if [ "$status_code" != "null" ]; then if [ "$status_code" != "null" ]; then
echo "No releases found or request failed, status code: $status_code" echo "No releases found or request failed, status code: $status_code"
echo "DEB_DOWNLOADED=false" >> $GITHUB_ENV echo "DEB_DOWNLOADED=false" >> $GITHUB_ENV
exit 0 exit 0
fi fi
set -e
release_version=$(echo "$release_info" | jq -r '.assets[] | select(.name | contains("iphoneos-arm.deb")) | .name' | grep -o '_[0-9.]\+_' | tr -d '_') release_version=$(echo "$release_info" | jq -r '.assets[] | select(.name | contains("iphoneos-arm.deb")) | .name' | grep -o '_[0-9.]\+_' | tr -d '_')
control_version=$(grep '^Version:' control | cut -d ' ' -f 2) control_version=$(grep '^Version:' control | cut -d ' ' -f 2)
if [ "$release_version" = "$control_version" ]; then if [ "$release_version" = "$control_version" ]; then
echo "Versions match. Downloading DEB files..." echo "Versions match. Downloading DEB files..."
echo "$release_info" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url' | xargs -I {} curl -L -O {} echo "$release_info" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url' | xargs -I {} curl -L -O {}
@ -110,19 +115,11 @@ jobs:
- name: Download Discord IPA - name: Download Discord IPA
run: | run: |
curl -L -o discord.ipa ${{ github.event.inputs.ipa_url }} curl -L -o discord.ipa ${{ github.event.inputs.ipa_url }}
- name: Make patcher directory
run: mkdir patcher
- name: Download IPA patcher
working-directory: patcher
run: |
curl -L -o patcher https://github.com/amsyarasyiq/bunny-ipa-patcher/releases/download/release-pyon/patcher.mac-amd64
chmod +x patcher
- name: Download IPA icons - name: Download IPA icons
working-directory: patcher
run: | run: |
curl -L -o ipa-icons.zip https://raw.githubusercontent.com/pyoncord/assets/main/ipa-icons.zip curl -L -o ipa-icons.zip https://raw.githubusercontent.com/pyoncord/assets/main/ipa-icons.zip
unzip ipa-icons.zip
- name: Extract Values - name: Extract Values
run: | run: |
@ -135,21 +132,11 @@ jobs:
- name: Inject tweak - name: Inject tweak
run: | run: |
mkdir -p ${{ github.workspace }}/build bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
git clone https://github.com/Al4ise/Azule.git pyzule -n ${{ env.APP_NAME }} -k PyoncordIcon60x60@2x.png -d -i discord.ipa -o ${{ github.workspace }}/${{ env.APP_NAME }}.ipa -f $(find ${{ github.workspace }} -name 'dev.theos.orion14_*_iphoneos-arm.deb' | head -n 1) ${{ github.workspace }}/${{ env.DEB_FILE_NAME }}
./Azule/azule -i discord.ipa -o ${{ github.workspace }}/build -f $(find ${{ github.workspace }} -name 'dev.theos.orion14_*_iphoneos-arm.deb' | head -n 1) ${{ github.workspace }}/${{ env.DEB_FILE_NAME }}
mv "${{ github.workspace }}/build/"*.ipa "${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa"
- name: Patch Discord
working-directory: patcher
run : |
./patcher \
-d ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa \
-o ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa \
-i ./ipa-icons.zip
- name: Upload ipa as artifact - name: Upload ipa as artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ipa name: ipa
path: ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa path: ${{ github.workspace }}/${{ env.APP_NAME }}.ipa

View file

@ -24,17 +24,22 @@ jobs:
- name: Download Tweak - name: Download Tweak
run: | run: |
set -e set +e
release_info=$(gh api --header 'Accept: application/vnd.github+json' repos/${{ github.repository }}/releases/latest) release_info=$(gh api --header 'Accept: application/vnd.github+json' repos/${{ github.repository }}/releases/latest)
status_code=$(echo $release_info | jq -r ".status") status_code=$(echo $release_info | jq -r ".status")
if [ "$status_code" != "null" ]; then if [ "$status_code" != "null" ]; then
echo "No releases found or request failed, status code: $status_code" echo "No releases found or request failed, status code: $status_code"
echo "DEB_DOWNLOADED=false" >> $GITHUB_ENV echo "DEB_DOWNLOADED=false" >> $GITHUB_ENV
exit 0 exit 0
fi fi
set -e
release_version=$(echo "$release_info" | jq -r '.assets[] | select(.name | contains("iphoneos-arm.deb")) | .name' | grep -o '_[0-9.]\+_' | tr -d '_') release_version=$(echo "$release_info" | jq -r '.assets[] | select(.name | contains("iphoneos-arm.deb")) | .name' | grep -o '_[0-9.]\+_' | tr -d '_')
control_version=$(grep '^Version:' control | cut -d ' ' -f 2) control_version=$(grep '^Version:' control | cut -d ' ' -f 2)
if [ "$release_version" = "$control_version" ]; then if [ "$release_version" = "$control_version" ]; then
echo "Versions match. Downloading DEB files..." echo "Versions match. Downloading DEB files..."
echo "$release_info" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url' | xargs -I {} curl -L -O {} echo "$release_info" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url' | xargs -I {} curl -L -O {}
@ -111,19 +116,10 @@ jobs:
run: | run: |
curl -L -o discord.ipa ${{ github.event.inputs.ipa_url }} curl -L -o discord.ipa ${{ github.event.inputs.ipa_url }}
- name: Make patcher directory
run: mkdir patcher
- name: Download IPA patcher
working-directory: patcher
run: |
curl -L -o patcher https://github.com/amsyarasyiq/bunny-ipa-patcher/releases/download/release-pyon/patcher.mac-amd64
chmod +x patcher
- name: Download IPA icons - name: Download IPA icons
working-directory: patcher
run: | run: |
curl -L -o ipa-icons.zip https://raw.githubusercontent.com/pyoncord/assets/main/ipa-icons.zip curl -L -o ipa-icons.zip https://raw.githubusercontent.com/pyoncord/assets/main/ipa-icons.zip
unzip ipa-icons.zip
- name: Extract Values - name: Extract Values
run: | run: |
@ -138,24 +134,14 @@ jobs:
- name: Inject tweak - name: Inject tweak
run: | run: |
mkdir -p ${{ github.workspace }}/build bash -c "$(curl https://raw.githubusercontent.com/asdfzxcvbn/pyzule/main/install-pyzule.sh)"
git clone https://github.com/Al4ise/Azule.git pyzule -n ${{ env.APP_NAME }} -k PyoncordIcon60x60@2x.png -d -i discord.ipa -o ${{ github.workspace }}/${{ env.APP_NAME }}.ipa -f $(find ${{ github.workspace }} -name 'dev.theos.orion14_*_iphoneos-arm.deb' | head -n 1) ${{ github.workspace }}/${{ env.DEB_FILE_NAME }}
./Azule/azule -i discord.ipa -o ${{ github.workspace }}/build -f $(find ${{ github.workspace }} -name 'dev.theos.orion14_*_iphoneos-arm.deb' | head -n 1) ${{ github.workspace }}/${{ env.DEB_FILE_NAME }}
mv "${{ github.workspace }}/build/"*.ipa "${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa"
- name: Patch Discord
working-directory: patcher
run : |
./patcher \
-d ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa \
-o ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa \
-i ./ipa-icons.zip
- name: Upload ipa as artifact - name: Upload ipa as artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ipa name: ipa
path: ${{ github.workspace }}/build/${{ env.APP_NAME }}.ipa path: ${{ github.workspace }}/${{ env.APP_NAME }}.ipa
release-app: release-app:
runs-on: macos-14 runs-on: macos-14

View file

@ -1,6 +1,12 @@
# BunnyTweak # BunnyTweak
A rootful/rootless tweak to inject [Bunny](https://github.com/pyoncord/Bunny) into Discord. Forked [VendettaTweak](https://github.com/vendetta-mod/VendettaTweak), modified to match with [BunnyXposed](https://github.com/pyoncord/BunnyXposed) behavior. There are still slight differences between these two, and this tweak may be missing some loader features. Tweak to inject [Bunny](https://github.com/pyoncord/Bunny) into Discord. Forked [VendettaTweak](https://github.com/vendetta-mod/VendettaTweak), modified to match with [BunnyXposed](https://github.com/pyoncord/BunnyXposed) behavior. There are still slight differences between these two, and this tweak may be missing some loader features.
> [!NOTE]
> As of right now this tweak does not encompass some functionalities when running in a jailed environment with a wildcard certificate \
> If you value these features sign the application with a local dev certificate:
> - setAlternateAppIcon does not work, thus breaking dynamic app icons
> - sharing files to the application/selecting items via the Files app does not work
## Installation ## Installation
@ -10,16 +16,20 @@ Builds can be found in the [Releases](https://github.com/pyoncord/BunnyTweak/rel
> Raw decrypted IPAs which are used to provide prepatched IPAs are sourced from the [Enmity](https://github.com/enmity-mod/) community. These raw decrypted IPAs are also used throughout Enmity related projects such as [enmity-mod/tweak](https://github.com/enmity-mod/tweak/) and [acquitelol/rosiecord](https://github.com/acquitelol/rosiecord).\ > Raw decrypted IPAs which are used to provide prepatched IPAs are sourced from the [Enmity](https://github.com/enmity-mod/) community. These raw decrypted IPAs are also used throughout Enmity related projects such as [enmity-mod/tweak](https://github.com/enmity-mod/tweak/) and [acquitelol/rosiecord](https://github.com/acquitelol/rosiecord).\
> All credits are attributed to the owner(s) of the raw IPAs. > All credits are attributed to the owner(s) of the raw IPAs.
### Jailbroken (Rootful/Rootless) ### Jailbroken
1. Install the Orion runtime via your preferred package manager, by adding `https://repo.chariz.com/` to your sources, then finding `Orion Runtime`. 1. Install the Orion runtime via your preferred package manager, by adding `https://repo.chariz.com/` to your sources, then finding `Orion Runtime`.
1. Install Bunny by downloading the appropriate `.deb` file (or by building your own, see [Building BunnyTweak locally](#building-bunnytweak-locally)). Use the file ending in `arm.deb` for rootful jailbreaks, and the file ending in `arm64.deb` for rootless jailbreaks. 1. Install Bunny by downloading the appropriate Debian package (or by building your own, see [Building BunnyTweak locally](#building-bunnytweak-locally)) and adding it to your package manager. Use the file ending in `arm.deb` for rootful jailbreaks, and the file ending in `arm64.deb` for rootless jailbreaks.
### Jailed ### Jailed
<a href="https://tinyurl.com/24zjszuf"><img src="https://i.imgur.com/dsbDLK9.png" width="230"></a>
<a href="https://tinyurl.com/yh455zk6"><img src="https://i.imgur.com/46qhEAv.png" width="230"></a> <a href="https://tinyurl.com/yh455zk6"><img src="https://i.imgur.com/46qhEAv.png" width="230"></a>
1. Download and install `Bunny.ipa` using your preferred sideloading method. > [!NOTE]
> TrollStore may display an encryption warning, which you can disregard.
1. Download and install [Bunny.ipa](https://github.com/pyoncord/BunnyTweak/releases/latest/download/Bunny.ipa) using your preferred sideloading method.
## Building BunnyTweak locally ## Building BunnyTweak locally