Skip to content

Commit

Permalink
ci: remove the hardcoded tag & fix content snap release (#10)
Browse files Browse the repository at this point in the history
* ci: remove the hardcoded tag

* ci: specify the branch
  • Loading branch information
soumyaDghosh authored Jul 14, 2024
1 parent d723b7e commit 5e1e0dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-content-to-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_run:
workflows: ["Release webkitgtk-6-gnome-2404-sdk to candidate"]
types: [completed]
branches: ["2404"]
paths:
- "webkitgtk-6-gnome-2404/**"
workflow_dispatch:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/update-sdk-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
branch: "2404"
snapcraft-project-root: "webkitgtk-6-gnome-2404-sdk"
update-script: |
webkitgtk_version=$(curl -s 'https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/46.2/elements/sdk/webkitgtk.inc?ref_type=tags' | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
latest_tag=$(git ls-remote --refs --sort='v:refname' --tags https://gitlab.gnome.org/GNOME/gnome-build-meta.git | awk -F'/' '{print $NF}' | grep -E '^[0-9]+(\.[0-9]+)*$' | sort -V | tail -n 1)
webkitgtk_version=$(curl -s "https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/${latest_tag}/elements/sdk/webkitgtk.inc?ref_type=tags" | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
yq -i ".version=\"$webkitgtk_version\"" webkitgtk-6-gnome-2404-sdk/snapcraft.yaml
sync-content-version:
Expand All @@ -41,5 +42,6 @@ jobs:
branch: "2404"
snapcraft-project-root: "webkitgtk-6-gnome-2404"
update-script: |
webkitgtk_version=$(curl -s 'https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/46.2/elements/sdk/webkitgtk.inc?ref_type=tags' | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
latest_tag=$(git ls-remote --refs --sort='v:refname' --tags https://gitlab.gnome.org/GNOME/gnome-build-meta.git | awk -F'/' '{print $NF}' | grep -E '^[0-9]+(\.[0-9]+)*$' | sort -V | tail -n 1)
webkitgtk_version=$(curl -s "https://gitlab.gnome.org/GNOME/gnome-build-meta/-/raw/${latest_tag}/elements/sdk/webkitgtk.inc?ref_type=tags" | yq eval '.sources[0].url' | cut -d : -f 2 | cut -d - -f 2 | cut -c -6)
yq -i ".version=\"$webkitgtk_version\"" webkitgtk-6-gnome-2404/snapcraft.yaml

0 comments on commit 5e1e0dd

Please sign in to comment.