From 5e1e0ddc4ebfa69d8ef4b9b91c68a84cb73ac0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A6=B8=E0=A7=8C=E0=A6=AE=E0=A7=8D=E0=A6=AF=E0=A6=A6?= =?UTF-8?q?=E0=A7=80=E0=A6=AA=20=E0=A6=98=E0=A7=8B=E0=A6=B7?= <72045785+soumyaDghosh@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:55:57 +0530 Subject: [PATCH] ci: remove the hardcoded tag & fix content snap release (#10) * ci: remove the hardcoded tag * ci: specify the branch --- .github/workflows/release-content-to-candidate.yml | 1 + .github/workflows/update-sdk-snap.yml | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-content-to-candidate.yml b/.github/workflows/release-content-to-candidate.yml index be87310..264fee9 100644 --- a/.github/workflows/release-content-to-candidate.yml +++ b/.github/workflows/release-content-to-candidate.yml @@ -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: diff --git a/.github/workflows/update-sdk-snap.yml b/.github/workflows/update-sdk-snap.yml index db5effc..7d92895 100644 --- a/.github/workflows/update-sdk-snap.yml +++ b/.github/workflows/update-sdk-snap.yml @@ -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: @@ -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