build: specify vscode version to build (#807)

This commit is contained in:
Baptiste Augrain
2021-08-27 16:01:17 +02:00
committed by GitHub
parent a5506b975c
commit 96332714ae
7 changed files with 65 additions and 51 deletions

View File

@@ -16,15 +16,15 @@ fi
# }
# `url` is URL_BASE + filename of asset e.g.
# darwin: https://github.com/VSCodium/vscodium/releases/download/${LATEST_MS_TAG}/VSCodium-darwin-${LATEST_MS_TAG}.zip
# `name` is $LATEST_MS_TAG
# `version` is $LATEST_MS_COMMIT
# `productVersion` is $LATEST_MS_TAG
# darwin: https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}/VSCodium-darwin-${MS_TAG}.zip
# `name` is $MS_TAG
# `version` is $MS_COMMIT
# `productVersion` is $MS_TAG
# `hash` in <filename>.sha1
# `timestamp` is $(node -e 'console.log(Date.now())')
# `sha256hash` in <filename>.sha256
URL_BASE=https://github.com/VSCodium/vscodium/releases/download/${LATEST_MS_TAG}
URL_BASE=https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}
# to make testing on forks easier
VERSIONS_REPO="${GITHUB_USERNAME}/versions"
@@ -37,9 +37,9 @@ generateJson() {
# generate parts
local url=${URL_BASE}/${assetName}
local name=$LATEST_MS_TAG
local version=$LATEST_MS_COMMIT
local productVersion=$LATEST_MS_TAG
local name=$MS_TAG
local version=$MS_COMMIT
local productVersion=$MS_TAG
local timestamp=$(node -e 'console.log(Date.now())')
local sha1hash=$(cat ${assetName}.sha1 | awk '{ print $1 }')
@@ -93,25 +93,25 @@ cd ..
if [[ "$OS_NAME" == "osx" ]]; then
# zip, sha1, and sha256 files are all at top level dir
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${LATEST_MS_TAG}.zip
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip
VERSION_PATH="darwin/${VSCODE_ARCH}"
JSON="$(generateJson ${ASSET_NAME})"
updateLatestVersion "$VERSION_PATH" "$JSON"
elif [[ "$OS_NAME" == "windows" ]]; then
# system installer
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${LATEST_MS_TAG}.exe
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
VERSION_PATH="win32/${VSCODE_ARCH}/system"
JSON="$(generateJson ${ASSET_NAME})"
updateLatestVersion "$VERSION_PATH" "$JSON"
# user installer
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${LATEST_MS_TAG}.exe
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
VERSION_PATH="win32/${VSCODE_ARCH}/user"
JSON="$(generateJson ${ASSET_NAME})"
updateLatestVersion "$VERSION_PATH" "$JSON"
# windows archive
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${LATEST_MS_TAG}.zip
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
VERSION_PATH="win32/${VSCODE_ARCH}/archive"
JSON="$(generateJson ${ASSET_NAME})"
updateLatestVersion "$VERSION_PATH" "$JSON"
@@ -119,7 +119,7 @@ else # linux
# update service links to tar.gz file
# see https://update.code.visualstudio.com/api/update/linux-x64/stable/VERSION
# as examples
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${LATEST_MS_TAG}.tar.gz
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz
VERSION_PATH="linux/${VSCODE_ARCH}"
JSON="$(generateJson ${ASSET_NAME})"
updateLatestVersion "$VERSION_PATH" "$JSON"