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"
|
2022-08-29 11:53:29 -04:00
|
|
|
export SKIP_PACKAGES="yes"
|
2022-08-29 09:13:25 -04:00
|
|
|
export VSCODE_LATEST="no"
|
|
|
|
export VSCODE_QUALITY="stable"
|
|
|
|
|
2022-08-29 11:53:29 -04:00
|
|
|
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"
|
|
|
|
;;
|
2022-08-29 11:53:29 -04:00
|
|
|
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
|
|
|
|
|
2022-08-30 07:55:17 -04:00
|
|
|
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
|
2022-08-29 11:53:29 -04:00
|
|
|
. build.sh
|
2022-08-29 09:13:25 -04:00
|
|
|
|
2022-09-04 14:50:52 -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
|
|
|
|
|
2022-08-29 11:53:29 -04:00
|
|
|
if [[ "${SKIP_PACKAGES}" == "no" ]]; then
|
|
|
|
if [[ "${OS_NAME}" == "windows" ]]; then
|
|
|
|
rm -rf build/windows/msi/releasedir
|
|
|
|
fi
|
|
|
|
|
|
|
|
. prepare_artifacts.sh
|
|
|
|
fi
|