diff --git a/check_tags.ps1 b/check_tags.ps1 deleted file mode 100644 index 7d88dee..0000000 --- a/check_tags.ps1 +++ /dev/null @@ -1,38 +0,0 @@ -echo "tag: $env:LATEST_MS_TAG" -$REPO_URI = [uri]$env:BUILD_REPOSITORY_URI -$USER_REPO = $REPO_URI."LocalPath" -echo $USER_REPO -$GITHUB_RESPONSE = curl.exe -s -H "Authorization: token $env:MAPPED_GITHUB_TOKEN" "https://api.github.com/repos$USER_REPO/releases/tags/$env:LATEST_MS_TAG" -echo "Github response: ${GITHUB_RESPONSE}" -$VSCODIUM_ASSETS = $GITHUB_RESPONSE | jq '.assets' -echo "VSCodium assets: ${VSCODIUM_ASSETS}" - -# if we just don't have the github token, get out fast -if (!$env:MAPPED_GITHUB_TOKEN -or $env:MAPPED_GITHUB_TOKEN -like "*GITHUB_TOKEN*") { - echo "This build does not have the GH token" - echo $env:MAPPED_GITHUB_TOKEN - return -} - -if ($VSCODIUM_ASSETS -eq "null" -or !$VSCODIUM_ASSETS) { - echo "Release assets do not exist at all, continuing build" - $SHOULD_BUILD = 'yes' -} else { - $WindowsAssets = ($VSCODIUM_ASSETS | ConvertFrom-Json) | Where-Object { $_.name.Contains('exe') } - $SYSTEM_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('Setup') } - $USER_SETUP = $WindowsAssets | Where-Object { $_.name.Contains('User') } - if (!$SYSTEM_SETUP) { - echo "Building on Windows because we have no system-setup.exe"; - $SHOULD_BUILD = 'yes' - } - elseif (!$USER_SETUP) { - echo "Building on Windows because we have no user-setup.exe"; - $SHOULD_BUILD = 'yes' - } - else { - echo "Already have all the Windows builds" - } -} - - -Write-Host "##vso[task.setvariable variable=SHOULD_BUILD]$SHOULD_BUILD" \ No newline at end of file diff --git a/check_tags.sh b/check_tags.sh index c6f2ae1..8d7f38b 100755 --- a/check_tags.sh +++ b/check_tags.sh @@ -17,7 +17,7 @@ if [ "$GITHUB_TOKEN" != "" ]; then fi elif [[ "$OS_NAME" == "windows" ]]; then if [[ $VSCODE_ARCH == "arm64" ]]; then - HAVE_ARM64_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') + HAVE_ARM64_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "VSCodiumSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_ARM64_USR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "UserSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_ARM64_ZIP=$(echo $VSCODIUM_ASSETS | jq --arg suffix "win32-$VSCODE_ARCH-$LATEST_MS_TAG.zip" 'map(.name) | contains([$suffix])') if [[ "$HAVE_ARM64_SYS" != "true" ]]; then @@ -36,7 +36,7 @@ if [ "$GITHUB_TOKEN" != "" ]; then echo "Already have all the Windows arm64 builds" fi elif [[ $VSCODE_ARCH == "ia32" ]]; then - HAVE_IA32_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') + HAVE_IA32_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "VSCodiumSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_IA32_USR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "UserSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_IA32_ZIP=$(echo $VSCODIUM_ASSETS | jq --arg suffix "win32-$VSCODE_ARCH-$LATEST_MS_TAG.zip" 'map(.name) | contains([$suffix])') if [[ "$HAVE_IA32_SYS" != "true" ]]; then @@ -55,7 +55,7 @@ if [ "$GITHUB_TOKEN" != "" ]; then echo "Already have all the Windows ia32 builds" fi else # Windows x64 - HAVE_X64_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') + HAVE_X64_SYS=$(echo $VSCODIUM_ASSETS | jq --arg suffix "VSCodiumSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_X64_USR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "UserSetup-$VSCODE_ARCH-$LATEST_MS_TAG.exe" 'map(.name) | contains([$suffix])') HAVE_X64_ZIP=$(echo $VSCODIUM_ASSETS | jq --arg suffix "win32-$VSCODE_ARCH-$LATEST_MS_TAG.zip" 'map(.name) | contains([$suffix])') if [[ "$HAVE_X64_SYS" != "true" ]]; then