feat: build insider from saved commit or from the latest

This commit is contained in:
Baptiste Augrain
2022-08-22 15:10:00 +02:00
parent 3a0ac5f70e
commit 70e6f66c60
6 changed files with 78 additions and 61 deletions

54
build/build.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
### Windows
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build_windows.sh
###
export INSIDER="no"
export VSCODE_LATEST="no"
while getopts ":il" opt; do
case "$opt" in
i)
export INSIDER="yes"
;;
l)
export VSCODE_LATEST="yes"
;;
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 "VSCODE_ARCH: ${VSCODE_ARCH}"
echo "VSCODE_LATEST: ${VSCODE_LATEST}"
echo "INSIDER: ${INSIDER}"
rm -rf vscode* VSCode*
if [[ "${OS_NAME}" == "windows" ]]; then
rm -rf build/windows/msi/releasedir
fi
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no . build.sh

View File

@@ -1,12 +0,0 @@
#!/bin/bash
rm -rf VSCode*
rm -rf vscode*
if [[ "${1}" == "insider" ]]; then
export INSIDER="yes"
fi
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 . build.sh

View File

@@ -1,22 +0,0 @@
#!/bin/bash
rm -rf VSCode*
rm -rf vscode*
UNAME_ARCH=$( uname -m )
if [[ "${UNAME_ARCH}" == "arm64" ]]; then
export VSCODE_ARCH="arm64"
else
export VSCODE_ARCH="x64"
fi
echo "-- VSCODE_ARCH: ${VSCODE_ARCH}"
if [[ "${1}" == "insider" ]]; then
export INSIDER="yes"
fi
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx . build.sh

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build_windows.sh
rm -rf VSCode*
rm -rf vscode*
rm -rf build/windows/msi/releasedir
if [[ "${1}" == "insider" ]]; then
export INSIDER="yes"
fi
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=windows VSCODE_ARCH=x64 . build.sh