Compare commits

..

5 Commits

Author SHA1 Message Date
Baptiste Augrain
272566cc25 fix: use correct directory to generate new version [skip ci] 2023-06-13 15:31:03 +02:00
Baptiste Augrain
d3db3c1f52 ci: add log when updating version [skip ci] 2023-06-13 15:24:24 +02:00
Baptiste Augrain
aac82d75f4 ci: add log when updating version [skip ci] 2023-06-13 14:33:30 +02:00
Lex
c66d9b7edc fix(workflow): typo in stable-linux (#1544) 2023-06-11 16:48:56 +02:00
Baptiste Augrain
73f7d062da fix(linux): ppc64le [skip ci] 2023-06-09 00:16:20 +02:00
2 changed files with 22 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ jobs:
npm_arch: arm
image: vscodium/vscodium-linux-build-agent:buster-armhf
- vscode_arch: ppc64le
npm_arch: ppcc64le
npm_arch: ppc64le
image: vscodium/vscodium-linux-build-agent:bionic-ppc64le
container:
image: ${{ matrix.image }}

View File

@@ -21,6 +21,11 @@ if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
exit
fi
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
echo "Skip ppc64le since only reh is published"
exit
fi
# {
# "url": "https://az764295.vo.msecnd.net/stable/51b0b28134d51361cf996d2f0a1c698247aeabd8/VSCode-darwin-stable.zip",
# "name": "1.33.1",
@@ -83,22 +88,27 @@ generateJson() {
}
updateLatestVersion() {
echo "Generating ${VERSION_PATH}/latest.json"
echo "Updating ${VERSION_PATH}/latest.json"
# do not update the same version
if [[ -f "versions/${VERSION_PATH}/latest.json" ]]; then
CURRENT_VERSION=$( jq -r '.name' "versions/${VERSION_PATH}/latest.json" )
if [[ -f "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json" ]]; then
CURRENT_VERSION=$( jq -r '.name' "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json" )
echo "CURRENT_VERSION: ${CURRENT_VERSION}"
if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
return
fi
fi
mkdir -p "versions/${VERSION_PATH}"
echo "Generating ${VERSION_PATH}/latest.json"
mkdir -p "${REPOSITORY_NAME}/${VERSION_PATH}"
generateJson
echo "${JSON_DATA}" > "versions/${VERSION_PATH}/latest.json"
echo "${JSON_DATA}" > "${REPOSITORY_NAME}/${VERSION_PATH}/latest.json"
echo "${JSON_DATA}"
}
# init versions repo for later commiting + pushing the json file to it
@@ -159,12 +169,18 @@ git add .
CHANGES=$( git status --porcelain )
if [[ ! -z "${CHANGES}" ]]; then
echo "Some changes have been found, pushing them"
dateAndMonth=$( date "+%D %T" )
git commit -m "CI update: ${dateAndMonth} (Build ${GITHUB_RUN_NUMBER})"
if ! git push origin master --quiet; then
git pull origin master
git push origin master --quiet
fi
else
echo "No changes"
fi
cd ..