Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Changes in the sync process #118

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
with:
token: ${{ secrets.SNAPCRAFTERS_BOT_COMMIT }}
update-script: |
version_url=$(python3 get_latest.py)
version=$(echo "$version_url" | cut -d ' ' -f1)
url=$(echo "$version_url" | cut -d ' ' -f2)
yq -i ".parts.android-studio.source = \"$url\"" snap/snapcraft.yaml
yq -i ".version = \"$version\"" snap/snapcraft.yaml
source_url="$(curl -sL https://developer.android.com/studio/index.html | grep -Eo '"((https)?://.*linux.tar.gz)"' | tr -d '"')"
codename="$(curl -sL https://developer.android.com/studio/index.html | grep -Po 'Download Android Studio (?!today)[A-Za-z0-9]+' | head -n1 | cut -d ' ' -f4)"
version="$(echo "$source_url" | rev | cut -d '/' -f2 | rev && echo "$codename")"
sed -i 's/^\(source: \).*$/\1'"\"$source_url\""'/' snap/snapcraft.yaml
sed -i 's/^\(version: \).*$/\1'"\"$version\""'/' snap/snapcraft.yaml
29 changes: 0 additions & 29 deletions get_latest.py

This file was deleted.

Loading