fix: check insider version from release note [skip ci]
This commit is contained in:
parent
f8f64410c6
commit
c35178f8b7
1 changed files with 16 additions and 4 deletions
|
@ -16,24 +16,36 @@ fi
|
||||||
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPOSITORY}/releases/latest" )
|
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPOSITORY}/releases/latest" )
|
||||||
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
|
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
|
||||||
|
|
||||||
|
|
||||||
|
GITHUB_RESPONSE=$( curl -s "https://api.github.com/repos/VSCodium/vscodium-insiders/releases/latest" )
|
||||||
|
|
||||||
if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
||||||
if [ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]; then
|
if [ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]; then
|
||||||
echo "New VSCode version, new build"
|
echo "New VSCode version, new build"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
|
|
||||||
VSCODIUM_ASSETS="null"
|
|
||||||
elif [[ "${NEW_RELEASE}" == "true" ]]; then
|
elif [[ "${NEW_RELEASE}" == "true" ]]; then
|
||||||
echo "New release build"
|
echo "New release build"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
|
elif [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||||
|
BODY=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.body' )
|
||||||
|
|
||||||
VSCODIUM_ASSETS="null"
|
if [[ "${BODY}" =~ ^MS_COMMIT:[[:blank:]]([a-z0-9]+) ]]; then
|
||||||
else
|
if [ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]; then
|
||||||
|
echo "New VSCode Insiders version, new build"
|
||||||
|
export SHOULD_BUILD="yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
export RELEASE_VERSION="${LATEST_VERSION}"
|
export RELEASE_VERSION="${LATEST_VERSION}"
|
||||||
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
|
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
|
||||||
|
|
||||||
echo "Switch to release version: ${RELEASE_VERSION}"
|
echo "Switch to release version: ${RELEASE_VERSION}"
|
||||||
|
|
||||||
VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
|
VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
|
||||||
|
else
|
||||||
|
VSCODIUM_ASSETS="null"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue