From df8b53671ceb804dd969398669acc19a54fbdacc Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Tue, 27 Feb 2024 10:51:07 +0100 Subject: [PATCH] build(linux): don't use env [skip ci] --- stores/snapcraft/insider/snap/snapcraft.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stores/snapcraft/insider/snap/snapcraft.yaml b/stores/snapcraft/insider/snap/snapcraft.yaml index e08dcf3..e88fe4a 100644 --- a/stores/snapcraft/insider/snap/snapcraft.yaml +++ b/stores/snapcraft/insider/snap/snapcraft.yaml @@ -16,7 +16,8 @@ parts: set -eu # Get .deb url wget --quiet https://api.github.com/repos/VSCodium/vscodium-insiders/releases -O latest.json - DEB_URL=$( jq -r 'map(select(.tag_name == "'"${RELEASE_VERSION}"'"))|first.assets[].browser_download_url|select(endswith("'"_${SNAPCRAFT_TARGET_ARCH}.deb"'"))' latest.json ) + VERSION=$( jq -r 'sort_by(.tag_name)|last.tag_name' latest.json ) + DEB_URL=$( jq -r 'map(select(.tag_name == "'"${VERSION}"'"))|first.assets[].browser_download_url|select(endswith("'"_${SNAPCRAFT_TARGET_ARCH}.deb"'"))' latest.json ) DEB_NAME=$( basename "${DEB_URL}" ) # Downloading .deb wget "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB_NAME}" @@ -26,7 +27,7 @@ parts: rm -f latest.json rm -f "${SNAPCRAFT_PART_INSTALL}/${DEB_NAME}" # Set version - snapcraftctl set-version "${RELEASE_VERSION/-*/}" + snapcraftctl set-version "${VERSION/-*/}" # Prepare GUI mkdir -p "${SNAPCRAFT_PART_INSTALL}/meta/gui" cp "${SNAPCRAFT_PART_INSTALL}/usr/share/codium-insiders/resources/app/resources/linux/code.png" "${SNAPCRAFT_PART_INSTALL}/meta/gui/codium-insiders.png"