From 3d72f1c08b8f665ddecff2ee6cb6fbf157b3a749 Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Sun, 16 Nov 2025 08:38:41 -0300 Subject: [PATCH] build: Silence error output on git describe check --- build/linux/snap/3_dist-gimp-snapcraft.sh | 2 +- build/windows/store/3_dist-gimp-winsdk.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/linux/snap/3_dist-gimp-snapcraft.sh b/build/linux/snap/3_dist-gimp-snapcraft.sh index e03b11c1f7..bf36879f60 100644 --- a/build/linux/snap/3_dist-gimp-snapcraft.sh +++ b/build/linux/snap/3_dist-gimp-snapcraft.sh @@ -77,7 +77,7 @@ fi # Publish GIMP snap on Snap Store # (the credentials are stored on SNAPCRAFT_STORE_CREDENTIALS protected var) -if [ "$CI_COMMIT_TAG" = "$(git describe --tags --exact-match)" ] && [ "$NAME" = 'gimp' ] && { [ "$TRACK" = 'preview' ] || [ "$TRACK" = 'latest' ]; }; then +if [ "$CI_COMMIT_TAG" = "$(git describe --tags --exact-match 2>/dev/null)" ] && [ "$NAME" = 'gimp' ] && { [ "$TRACK" = 'preview' ] || [ "$TRACK" = 'latest' ]; }; then printf "\e[0Ksection_start:`date +%s`:${SNAP}_submission[collapsed=true]\r\e[0KPublishing snap to Snap Store\n" snapcraft upload --release=$TRACK/stable $output_dir/${SNAP} printf "\e[0Ksection_end:`date +%s`:${SNAP}_submission\r\e[0K\n" diff --git a/build/windows/store/3_dist-gimp-winsdk.ps1 b/build/windows/store/3_dist-gimp-winsdk.ps1 index 72acdd0d51..94d6800d8f 100644 --- a/build/windows/store/3_dist-gimp-winsdk.ps1 +++ b/build/windows/store/3_dist-gimp-winsdk.ps1 @@ -50,7 +50,7 @@ $win_sdk_path = Get-ItemProperty Registry::'HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432N $env:PATH = "${win_sdk_path}bin\${win_sdk_version}.0\$cpu_arch;${win_sdk_path}App Certification Kit;" + $env:PATH ## msstore-cli (ONLY FOR RELEASES) -if ("$CI_COMMIT_TAG" -eq (git describe --tags --exact-match)) +if ("$CI_COMMIT_TAG" -eq (git describe --tags --exact-match 2>$null)) { #.NET runtime required by msstore-cli (and its PowerShell counterpart) [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 @@ -473,7 +473,7 @@ if ($GITLAB_CI) # 7. SUBMIT .MSIXUPLOAD TO MS STORE (ONLY FOR RELEASES) -if ("$CI_COMMIT_TAG" -eq (git describe --tags --exact-match)) +if ("$CI_COMMIT_TAG" -eq (git describe --tags --exact-match 2>$null)) { Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):msix_submission[collapsed=true]$([char]13)$([char]27)[0KSubmitting $MSIX_ARTIFACT to Microsoft Store" ## Needed credentials for submission