Skip to content

Commit

Permalink
Auto Update entitlements and Privacy Descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
yodaluca23 authored Feb 7, 2025
1 parent c59d005 commit 8862f57
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/Build and Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ jobs:
if: ${{ env.VIRUSTOTALKEY }}
run: echo "VTSWIFTPROTOBUF=${{ steps.vt-swiftprotobuf.outputs.analysis }}" >> $GITHUB_ENV

- name: Read Spotify Version from Vanilla .ipa
- name: Read Spotify information from vanilla .ipa
run: |
cp "${{ env.spotifypath }}" "Build Components/SpotifyAnylises.zip"
unzip "Build Components/SpotifyAnylises.zip" -d "Build Components"
Expand All @@ -269,6 +269,9 @@ jobs:
echo "VANILLASPOTIFYVERSION=$(/usr/libexec/PlistBuddy -c "Print :SpotifyVersionShort" Info.plist)" >> $GITHUB_ENV
echo "Vanilla Spotify Version: $VANILLASPOTIFYVERSION"
(echo "{"; find ./ -name "Info.plist" | while read file; do plutil -p "$file" 2>/dev/null | grep -E "NS.*Description" | sed -E 's/^\s*"([^"]+)".*"(.*)"$/"\1": "\2",/'; done | sed 's/ =>/:/g' | sed 's/\(.*\),/\1/' | tr '\n' ',' | sed 's/,$//' | sed 's/,/,\n/g'; echo "}") > NSDescriptions.json
(codesign -d --entitlements :- Payload/Spotify.app | \xmllint --format - | \xmllint --xpath "//*[name()='key' and (starts-with(., 'com.apple') or . = 'aps-environment' or . = 'keychain-access-groups')]" - | \sed -n 's/.*<key>\(.*\)<\/key>.*/\1/p' | \jq -R -s 'split("\n") | map(select(length > 0))') > Entitlements.json
#Clean Up
rm -rf Payload
rm -f SpotifyAnylises.zip
Expand Down Expand Up @@ -469,19 +472,25 @@ jobs:
- name: Update AltStore Repo.json
run: |
ENTITLE=$(cat "./Build Components/Entitlements.json")
PRIVACYKEYS=$(cat "./Build Components/NSDescriptions.json")
jq --arg CHANGEVERSION "${{ env.CHANGEVERSION }}" \
--arg CURRENTDATE "$(date +%Y-%-m-%d)" \
--arg SIZE "${{ env.ALTSPOTVSIZE }}" \
--arg ALTSTORECHANGELOG "${{ env.ALTSTORECHANGELOG }}" \
--arg VANILLASPOTIFYVERSION "${{ env.VANILLASPOTIFYVERSION }}" \
--arg EEVEEVERSIONNAME "${{ env.EEVEEVERSIONNAME }}" \
--argjson PRIVKEYS "$PRIVACYKEYS" \
--argjson ENTITLEMENTS "$ENTITLE" \
--arg ORIONVERSION "${{ env.ORIONVERSION }}" \
--arg SWIFTPROTOBUFVERSION "${{ env.SWIFTPROTOBUFVERSION }}" \
'
(.apps[] | select(.name == "SpotveeC") | .version) = $CHANGEVERSION |
(.apps[] | select(.name == "SpotveeC") | .versionDate) = $CURRENTDATE |
(.apps[] | select(.name == "SpotveeC") | .size) = ($SIZE | tonumber) |
(.apps[] | select(.name == "SpotveeC") | .changelog) = $ALTSTORECHANGELOG |
(.apps[] | select(.name == "SpotveeC") | .appPermissions.privacy) = $PRIVKEYS |
(.apps[] | select(.name == "SpotveeC") | .appPermissions.entitlements) = $ENTITLEMENTS |
(.apps[] | select(.name == "SpotveeC") | .versionDescription) = $ALTSTORECHANGELOG |
(.apps[] | select(.name == "SpotveeC") | .downloadURL) = "https://github.com/SpotCompiled/SpotveeC/releases/download/v\($CHANGEVERSION)/SpotveeC.v\($CHANGEVERSION)_v\($VANILLASPOTIFYVERSION)_ALTSTORESOURCE_ONLY.ipa" |
(.apps[] | select(.name == "SpotveeC") | .versions) |= [{
Expand Down

0 comments on commit 8862f57

Please sign in to comment.