Skip to content

Commit

Permalink
Merge pull request #118 from soumyaDghosh/master
Browse files Browse the repository at this point in the history
Various Changes in the sync process
  • Loading branch information
merlijn-sebrechts authored Dec 12, 2023
2 parents 0f128ca + 921d05f commit 6dc53de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 34 deletions.
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.

0 comments on commit 6dc53de

Please sign in to comment.