Skip to content

Commit

Permalink
[workflow]: fix the source-url
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaDghosh committed Dec 13, 2023
1 parent 6dc53de commit 58d56b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
update-script: |
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
version="$(basename "$source_url" .tar.gz | grep -oP '\d+\.\d+\.\d+\.\d+') $codename"
yq -i ".parts.android-studio.source = \"$source_url\"" snap/snapcraft.yaml
sed -i 's/^\(version: \).*$/\1'"\"$version\""'/' snap/snapcraft.yaml

0 comments on commit 58d56b4

Please sign in to comment.