feat: dev build script can build only packages
This commit is contained in:
parent
d7450f5afe
commit
ae2b84df50
5 changed files with 34 additions and 12 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@ VS*/*
|
||||||
VSCode*
|
VSCode*
|
||||||
VSCodium*
|
VSCodium*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
*.env
|
||||||
artifacts/
|
artifacts/
|
||||||
build/linux/appimage/out
|
build/linux/appimage/out
|
||||||
build/linux/appimage/pkg2appimage.AppDir
|
build/linux/appimage/pkg2appimage.AppDir
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -6,7 +6,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||||
npm config set scripts-prepend-node-path true
|
npm config set scripts-prepend-node-path true
|
||||||
npm config set node_gyp
|
npm config set node_gyp
|
||||||
|
|
||||||
echo "MS_COMMIT: ${MS_COMMIT}"
|
echo "MS_COMMIT=\"${MS_COMMIT}\""
|
||||||
|
|
||||||
. prepare_vscode.sh
|
. prepare_vscode.sh
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,12 @@
|
||||||
|
|
||||||
export CI_BUILD="no"
|
export CI_BUILD="no"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
|
export SKIP_BUILD="no"
|
||||||
export SKIP_PACKAGES="yes"
|
export SKIP_PACKAGES="yes"
|
||||||
export VSCODE_LATEST="no"
|
export VSCODE_LATEST="no"
|
||||||
export VSCODE_QUALITY="stable"
|
export VSCODE_QUALITY="stable"
|
||||||
|
|
||||||
while getopts ":ilp" opt; do
|
while getopts ":ilop" opt; do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
i)
|
i)
|
||||||
export VSCODE_QUALITY="insider"
|
export VSCODE_QUALITY="insider"
|
||||||
|
@ -18,6 +19,9 @@ while getopts ":ilp" opt; do
|
||||||
l)
|
l)
|
||||||
export VSCODE_LATEST="yes"
|
export VSCODE_LATEST="yes"
|
||||||
;;
|
;;
|
||||||
|
o)
|
||||||
|
export SKIP_BUILD="yes"
|
||||||
|
;;
|
||||||
p)
|
p)
|
||||||
export SKIP_PACKAGES="no"
|
export SKIP_PACKAGES="no"
|
||||||
;;
|
;;
|
||||||
|
@ -45,18 +49,35 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "OS_NAME=\"${OS_NAME}\""
|
echo "OS_NAME=\"${OS_NAME}\""
|
||||||
|
echo "SKIP_BUILD=\"${SKIP_BUILD}\""
|
||||||
echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
|
echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
|
||||||
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
|
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
|
||||||
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
|
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
|
||||||
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
|
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
|
||||||
|
|
||||||
rm -rf vscode* VSCode*
|
if [[ "${SKIP_BUILD}" == "no" ]]; then
|
||||||
|
rm -rf vscode* VSCode*
|
||||||
|
|
||||||
. get_repo.sh
|
. get_repo.sh
|
||||||
. build.sh
|
|
||||||
|
|
||||||
if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_LATEST}" == "yes" ]]; then
|
# save variables for later
|
||||||
|
echo "MS_TAG=\"${MS_TAG}\"" > build.env
|
||||||
|
echo "MS_COMMIT=\"${MS_COMMIT}\"" >> build.env
|
||||||
|
echo "RELEASE_VERSION=\"${RELEASE_VERSION}\"" >> build.env
|
||||||
|
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\"" >> build.env
|
||||||
|
|
||||||
|
. build.sh
|
||||||
|
|
||||||
|
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"
|
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
. build.env
|
||||||
|
|
||||||
|
echo "MS_TAG=\"${MS_TAG}\""
|
||||||
|
echo "MS_COMMIT=\"${MS_COMMIT}\""
|
||||||
|
echo "RELEASE_VERSION=\"${RELEASE_VERSION}\""
|
||||||
|
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${SKIP_PACKAGES}" == "no" ]]; then
|
if [[ "${SKIP_PACKAGES}" == "no" ]]; then
|
||||||
|
|
|
@ -80,16 +80,16 @@ if [[ -z "${MS_TAG}" ]]; then
|
||||||
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||||
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||||
elif [[ -z "${MS_COMMIT}" ]]; then
|
elif [[ -z "${MS_COMMIT}" ]]; then
|
||||||
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
REFERENCE=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
||||||
|
|
||||||
if [[ -z "${reference}" ]]; then
|
if [[ -z "${REFERENCE}" ]]; then
|
||||||
echo "The following tag can't be found: ${MS_TAG}"
|
echo "The following tag can't be found: ${MS_TAG}"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ "${reference}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
elif [[ "${REFERENCE}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
||||||
export MS_COMMIT="${BASH_REMATCH[1]}"
|
export MS_COMMIT="${BASH_REMATCH[1]}"
|
||||||
export MS_TAG="${BASH_REMATCH[2]}"
|
export MS_TAG="${BASH_REMATCH[2]}"
|
||||||
else
|
else
|
||||||
echo "The following reference can't be parsed: ${reference}"
|
echo "The following reference can't be parsed: ${REFERENCE}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -16,7 +16,7 @@ if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||||
export BUILD_SOURCEVERSION=$( echo "${vscodium_hash}:${vscode_hash}" | checksum )
|
export BUILD_SOURCEVERSION=$( echo "${vscodium_hash}:${vscode_hash}" | checksum )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Build version: ${BUILD_SOURCEVERSION}"
|
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
|
||||||
|
|
||||||
# for GH actions
|
# for GH actions
|
||||||
if [[ $GITHUB_ENV ]]; then
|
if [[ $GITHUB_ENV ]]; then
|
||||||
|
|
Loading…
Reference in a new issue