vscodium/build/build.sh

69 lines
1.4 KiB
Bash
Raw Normal View History

2022-08-29 09:13:25 -04:00
#!/bin/bash
### Windows
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
###
2022-08-29 15:56:51 -04:00
export CI_BUILD="no"
export SHOULD_BUILD="yes"
export SKIP_PACKAGES="yes"
2022-08-29 09:13:25 -04:00
export VSCODE_LATEST="no"
export VSCODE_QUALITY="stable"
while getopts ":ilp" opt; do
2022-08-29 09:13:25 -04:00
case "$opt" in
i)
export VSCODE_QUALITY="insider"
;;
l)
export VSCODE_LATEST="yes"
;;
p)
export SKIP_PACKAGES="no"
;;
2022-08-29 09:13:25 -04:00
esac
done
case "${OSTYPE}" in
darwin*)
export OS_NAME="osx"
;;
msys* | cygwin*)
export OS_NAME="windows"
;;
*)
export OS_NAME="linux"
;;
esac
UNAME_ARCH=$( uname -m )
if [[ "${UNAME_ARCH}" == "arm64" ]]; then
export VSCODE_ARCH="arm64"
else
export VSCODE_ARCH="x64"
fi
echo "OS_NAME=\"${OS_NAME}\""
echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
2022-08-29 09:13:25 -04:00
rm -rf vscode* VSCode*
. get_repo.sh
. build.sh
2022-08-29 09:13:25 -04:00
if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_LATEST}" == "yes" ]]; then
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
fi
if [[ "${SKIP_PACKAGES}" == "no" ]]; then
if [[ "${OS_NAME}" == "windows" ]]; then
rm -rf build/windows/msi/releasedir
fi
. prepare_artifacts.sh
fi