-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(linux): add alpine reh [skip ci]
- Loading branch information
Showing
2 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env bash | ||
# shellcheck disable=SC1091 | ||
|
||
set -ex | ||
|
||
if [[ "${CI_BUILD}" == "no" ]]; then | ||
exit 1 | ||
fi | ||
|
||
tar -xzf ./vscode.tar.gz | ||
|
||
cd vscode || { echo "'vscode' dir not found"; exit 1; } | ||
|
||
export VSCODE_PLATFORM='alpine' | ||
|
||
VSCODE_HOST_MOUNT="$( pwd )" | ||
|
||
export VSCODE_HOST_MOUNT | ||
|
||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:alpine-${VSCODE_ARCH}" | ||
|
||
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME | ||
|
||
for i in {1..5}; do # try 5 times | ||
yarn --cwd build --frozen-lockfile --check-files && break | ||
if [[ $i == 3 ]]; then | ||
echo "Yarn failed too many times" >&2 | ||
exit 1 | ||
fi | ||
echo "Yarn failed $i, trying again..." | ||
done | ||
|
||
node build/azure-pipelines/distro/mixin-npm | ||
|
||
yarn gulp minify-vscode-reh | ||
yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci" | ||
|
||
cd .. | ||
|
||
APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )" | ||
|
||
mkdir -p assets | ||
|
||
echo "Building and moving REH" | ||
cd "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}" | ||
tar czf "../assets/${APP_NAME_LC}-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" . | ||
cd .. | ||
|
||
npm install -g checksum | ||
|
||
sum_file() { | ||
if [[ -f "${1}" ]]; then | ||
echo "Calculating checksum for ${1}" | ||
checksum -a sha256 "${1}" > "${1}".sha256 | ||
checksum "${1}" > "${1}".sha1 | ||
fi | ||
} | ||
|
||
cd assets | ||
|
||
for FILE in *; do | ||
if [[ -f "${FILE}" ]]; then | ||
sum_file "${FILE}" | ||
fi | ||
done | ||
|
||
cd .. |