Merge branch 'master' into insider
This commit is contained in:
commit
d468b7a1e0
27 changed files with 236 additions and 263 deletions
9
build.sh
9
build.sh
|
@ -1,8 +1,9 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -ex
|
||||
|
||||
if [ -f "./remote-dependencies.tar" ]; then
|
||||
if [[ -f "./remote-dependencies.tar" ]]; then
|
||||
tar -xf ./remote-dependencies.tar ./vscode/remote/node_modules
|
||||
fi
|
||||
|
||||
|
@ -29,7 +30,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
|||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
|
||||
|
||||
find "../VSCode-darwin-${VSCODE_ARCH}" -exec touch {} \;
|
||||
find "../VSCode-darwin-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
|
||||
|
||||
VSCODE_PLATFORM="darwin"
|
||||
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
|
@ -47,7 +48,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
|||
else # linux
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
|
||||
|
||||
find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
|
||||
find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c
|
||||
|
||||
VSCODE_PLATFORM="linux"
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,SC2129
|
||||
|
||||
### Windows
|
||||
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
|
||||
|
@ -13,7 +14,7 @@ export SKIP_SOURCE="no"
|
|||
export VSCODE_LATEST="no"
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilop" opt; do
|
||||
while getopts ":ilops" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
|
@ -30,6 +31,8 @@ while getopts ":ilop" opt; do
|
|||
s)
|
||||
export SKIP_SOURCE="yes"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -100,7 +103,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
|
|||
. 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"
|
||||
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
||||
echo "${jsonTmp}" > "insider.json" && unset jsonTmp
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
exists() { type -t "$1" > /dev/null 2>&1; }
|
||||
exists() { type -t "$1" &> /dev/null; }
|
||||
|
||||
export APP_NAME="VSCodium"
|
||||
export CI_BUILD="no"
|
||||
|
@ -19,7 +20,9 @@ while getopts ":ilp" opt; do
|
|||
export VSCODE_LATEST="yes"
|
||||
;;
|
||||
p)
|
||||
export SKIP_ASSETS="no"
|
||||
export SKIP_ASSETS="no"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
|
@ -15,11 +15,11 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
wget -c "${APPIMAGE_URL}"
|
||||
wget -c "${APPIMAGE_URL}" -O pkg2appimage.AppImage
|
||||
|
||||
chmod +x ./pkg2appimage-*.AppImage
|
||||
chmod +x ./pkg2appimage.AppImage
|
||||
|
||||
./pkg2appimage-*.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
||||
./pkg2appimage.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
|
||||
|
||||
# add update's url
|
||||
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilp" opt; do
|
||||
while getopts ":i" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
URL=`curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/'`
|
||||
URL=$( curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/' )
|
||||
# echo "url: ${URL}"
|
||||
FILE=`echo "${URL}" | sed -E 's|.*/([^/]+\.zip)$|\1|'`
|
||||
FILE="${URL##*/}"
|
||||
# echo "file: ${FILE}"
|
||||
DIRECTORY=`echo "${URL}" | sed -E 's|.*/([^/]+)\.zip$|\1|'`
|
||||
DIRECTORY="${FILE%.zip}"
|
||||
# echo "directory: ${DIRECTORY}"
|
||||
|
||||
if [[ ! -f "${FILE}" ]]; then
|
||||
|
@ -28,8 +30,9 @@ if [[ ! -d "${DIRECTORY}" ]]; then
|
|||
unzip "${FILE}" -d "${DIRECTORY}"
|
||||
fi
|
||||
|
||||
APIS=`cat ${DIRECTORY}/resources/app/product.json | jq -r '.extensionEnabledApiProposals'`
|
||||
APIS=$( jq -r '.extensionEnabledApiProposals' "${DIRECTORY}/resources/app/product.json" )
|
||||
|
||||
APIS=`echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}'`
|
||||
APIS=$( echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}' )
|
||||
|
||||
cat <<< $(jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json) > product.json
|
||||
jsonTmp=$( jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":ilp" opt; do
|
||||
while getopts ":i" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -16,16 +18,15 @@ git add .
|
|||
git reset -q --hard HEAD
|
||||
|
||||
for FILE in ../patches/*.patch; do
|
||||
if [ -f "${FILE}" ]; then
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
echo applying patch: "${FILE}"
|
||||
git apply --ignore-whitespace "${FILE}"
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! git apply --ignore-whitespace "${FILE}"; then
|
||||
echo failed to apply patch "${FILE}"
|
||||
|
||||
git apply --reject "${FILE}"
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
git add .
|
||||
|
@ -38,16 +39,15 @@ done
|
|||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
for FILE in ../patches/insider/*.patch; do
|
||||
if [ -f "${FILE}" ]; then
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
echo applying patch: "${FILE}"
|
||||
git apply --ignore-whitespace "${FILE}"
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! git apply --ignore-whitespace "${FILE}"; then
|
||||
echo failed to apply patch "${FILE}"
|
||||
|
||||
git apply --reject "${FILE}"
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
git add .
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
|
@ -10,9 +10,8 @@ SCRIPT_DIR=$( pwd )
|
|||
|
||||
cd "../../../VSCode-win32-${VSCODE_ARCH}/resources/app"
|
||||
|
||||
cp product.json product.json.bak
|
||||
cat product.json.bak | jq "del(.updateUrl)" > product.json
|
||||
rm -f product.json.bak
|
||||
jsonTmp=$( jq "del(.updateUrl)" product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
||||
cd "${SCRIPT_DIR}"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
|
@ -11,14 +11,12 @@ WIN_SDK_FULL_VERSION="10.0.17763.0"
|
|||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
PRODUCT_NAME="VSCodium - Insiders"
|
||||
PRODUCT_SKU="vscodium-insiders"
|
||||
PRODUCT_CODE="VSCodiumInsiders"
|
||||
PRODUCT_UPGRADE_CODE="1C9B7195-5A9A-43B3-B4BD-583E20498467"
|
||||
ICON_DIR="..\\..\\..\\src\\insider\\resources\\win32"
|
||||
SETUP_RESOURCES_DIR=".\\resources\\insider"
|
||||
else
|
||||
PRODUCT_NAME="VSCodium"
|
||||
PRODUCT_SKU="vscodium"
|
||||
PRODUCT_CODE="VSCodium"
|
||||
PRODUCT_UPGRADE_CODE="965370CD-253C-4720-82FC-2E6B02A53808"
|
||||
ICON_DIR="..\\..\\..\\src\\stable\\resources\\win32"
|
||||
|
@ -51,7 +49,7 @@ fi
|
|||
sed -i "s|@@PRODUCT_UPGRADE_CODE@@|${PRODUCT_UPGRADE_CODE}|g" .\\includes\\vscodium-variables.wxi
|
||||
sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" .\\vscodium.xsl
|
||||
|
||||
find i18n -name '*.wxl' -exec sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" {} \;
|
||||
find i18n -name '*.wxl' -print0 | xargs -0 sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g"
|
||||
|
||||
BuildSetupTranslationTransform() {
|
||||
local CULTURE=${1}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -22,9 +23,9 @@ else
|
|||
export SHOULD_DEPLOY="yes"
|
||||
fi
|
||||
|
||||
if [[ "${GITHUB_ENV}" ]]; then
|
||||
if [[ "${GITHUB_ENV}" ]]; then
|
||||
echo "GITHUB_BRANCH=${GITHUB_BRANCH}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
|
||||
echo "VSCODE_QUALITY=${VSCODE_QUALITY}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not build because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
APP_NAME_LC=$( echo "${APP_NAME}" | awk '{print tolower($0)}' )
|
||||
APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"
|
||||
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${ASSETS_REPOSITORY}/releases/latest" )
|
||||
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
|
||||
|
||||
if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
||||
if [ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]; then
|
||||
if [[ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]]; then
|
||||
echo "New VSCode version, new build"
|
||||
export SHOULD_BUILD="yes"
|
||||
elif [[ "${NEW_RELEASE}" == "true" ]]; then
|
||||
|
@ -22,7 +23,7 @@ if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
|
|||
BODY=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.body' )
|
||||
|
||||
if [[ "${BODY}" =~ \[([a-z0-9]+)\] ]]; then
|
||||
if [ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]; then
|
||||
if [[ "${MS_COMMIT}" != "${BASH_REMATCH[1]}" ]]; then
|
||||
echo "New VSCode Insiders version, new build"
|
||||
export SHOULD_BUILD="yes"
|
||||
fi
|
||||
|
@ -46,7 +47,7 @@ contains() {
|
|||
echo "${ASSETS}" | grep "${1}\""
|
||||
}
|
||||
|
||||
if [ "${ASSETS}" != "null" ]; then
|
||||
if [[ "${ASSETS}" != "null" ]]; then
|
||||
# macos
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
||||
|
@ -366,6 +367,7 @@ else
|
|||
export SHOULD_BUILD="yes"
|
||||
fi
|
||||
|
||||
|
||||
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD_APPIMAGE=${SHOULD_BUILD_APPIMAGE}" >> "${GITHUB_ENV}"
|
||||
echo "SHOULD_BUILD_DEB=${SHOULD_BUILD_DEB}" >> "${GITHUB_ENV}"
|
||||
|
|
33
get_repo.sh
33
get_repo.sh
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2129
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -12,28 +13,28 @@ if [[ -z "${RELEASE_VERSION}" ]]; then
|
|||
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "insider.json" ]]; then
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/insider/0000000000000000000000000000000000000000 )
|
||||
else
|
||||
export MS_COMMIT=$(jq -r '.commit' insider.json)
|
||||
export MS_TAG=$(jq -r '.tag' insider.json)
|
||||
MS_COMMIT=$( jq -r '.commit' insider.json )
|
||||
MS_TAG=$( jq -r '.tag' insider.json )
|
||||
fi
|
||||
else
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/stable/0000000000000000000000000000000000000000 )
|
||||
fi
|
||||
|
||||
if [[ -z "${MS_COMMIT}" ]]; then
|
||||
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
export MS_TAG="${MS_TAG/\-insider/}"
|
||||
MS_TAG="${MS_TAG/\-insider/}"
|
||||
fi
|
||||
fi
|
||||
|
||||
date=$( date +%Y%j )
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
export RELEASE_VERSION="${MS_TAG}.${date: -5}-insider"
|
||||
RELEASE_VERSION="${MS_TAG}.${date: -5}-insider"
|
||||
else
|
||||
export RELEASE_VERSION="${MS_TAG}.${date: -5}"
|
||||
RELEASE_VERSION="${MS_TAG}.${date: -5}"
|
||||
fi
|
||||
else
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
|
@ -45,8 +46,8 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${MS_TAG}" == "$(jq -r '.tag' insider.json)" ]]; then
|
||||
export MS_COMMIT=$(jq -r '.commit' insider.json)
|
||||
if [[ "${MS_TAG}" == "$( jq -r '.tag' insider.json )" ]]; then
|
||||
MS_COMMIT=$( jq -r '.commit' insider.json )
|
||||
else
|
||||
echo "Error: No MS_COMMIT for ${RELEASE_VERSION}"
|
||||
exit 1
|
||||
|
@ -77,8 +78,8 @@ if [[ -z "${MS_TAG}" ]]; then
|
|||
else
|
||||
UPDATE_INFO=$( curl --silent --fail https://update.code.visualstudio.com/api/update/darwin/stable/0000000000000000000000000000000000000000 )
|
||||
fi
|
||||
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
|
||||
MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )
|
||||
elif [[ -z "${MS_COMMIT}" ]]; then
|
||||
REFERENCE=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
|
||||
|
||||
|
@ -86,8 +87,8 @@ elif [[ -z "${MS_COMMIT}" ]]; then
|
|||
echo "Error: The following tag can't be found: ${MS_TAG}"
|
||||
exit 1
|
||||
elif [[ "${REFERENCE}" =~ ^([[:alnum:]]+)[[:space:]]+refs\/tags\/([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
|
||||
export MS_COMMIT="${BASH_REMATCH[1]}"
|
||||
export MS_TAG="${BASH_REMATCH[2]}"
|
||||
MS_COMMIT="${BASH_REMATCH[1]}"
|
||||
MS_TAG="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "Error: The following reference can't be parsed: ${REFERENCE}"
|
||||
exit 1
|
||||
|
@ -108,3 +109,7 @@ if [[ "${GITHUB_ENV}" ]]; then
|
|||
echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
|
||||
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
|
||||
export MS_TAG
|
||||
export MS_COMMIT
|
||||
export RELEASE_VERSION
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -14,16 +15,16 @@ while getopts ":i" opt; do
|
|||
export QUALITY="insider"
|
||||
export COLOR="orange1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
check_programs() { # {{{
|
||||
for arg in "$@"
|
||||
do
|
||||
if ! command -v "${arg}" >/dev/null 2>&1
|
||||
then
|
||||
for arg in "$@"; do
|
||||
if ! command -v "${arg}" &> /dev/null; then
|
||||
echo "${arg} could not be found"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
} # }}}
|
||||
|
@ -36,7 +37,7 @@ SRC_PREFIX=""
|
|||
VSCODE_PREFIX=""
|
||||
|
||||
build_darwin_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/code.icns" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/code.icns" ]]; then
|
||||
rsvg-convert -w 655 -h 655 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite "code_logo.png" -gravity center "icons/template_macos.png" "code_1024.png"
|
||||
convert "code_1024.png" -resize 512x512 code_512.png
|
||||
|
@ -52,12 +53,11 @@ build_darwin_main() { # {{{
|
|||
build_darwin_types() { # {{{
|
||||
rsvg-convert -w 128 -h 128 "icons/${QUALITY}/codium_cnl_w80_b8.svg" -o "code_logo.png"
|
||||
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/darwin/*
|
||||
do
|
||||
if [ -f "${file}" ]; then
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/darwin/*; do
|
||||
if [[ -f "${file}" ]]; then
|
||||
name=$(basename "${file}" '.icns')
|
||||
|
||||
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/${name}.icns" ]; then
|
||||
if [[ "${name}" != 'code' ]] && [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/darwin/${name}.icns" ]]; then
|
||||
icns2png -x -s 512x512 "${file}" -o .
|
||||
|
||||
composite -blend 100% -geometry +323+365 "icons/corner_512.png" "${name}_512x512x32.png" "${name}.png"
|
||||
|
@ -76,41 +76,62 @@ build_darwin_types() { # {{{
|
|||
} # }}}
|
||||
|
||||
build_linux_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" ]]; then
|
||||
wget "https://raw.githubusercontent.com/VSCodium/icons/main/icons/linux/circle1/${COLOR}/paulo22s.png" -O "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png"
|
||||
fi
|
||||
|
||||
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm"
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm" ]]; then
|
||||
convert "${SRC_PREFIX}src/${QUALITY}/resources/linux/code.png" "${SRC_PREFIX}src/${QUALITY}/resources/linux/rpm/code.xpm"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_media() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg" ]]; then
|
||||
cp "icons/${QUALITY}/codium_clt.svg" "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg"
|
||||
gsed -i 's|width="100" height="100"|width="1024" height="1024"|' "${SRC_PREFIX}src/${QUALITY}/src/vs/workbench/browser/media/code-icon.svg"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_windows_main() { # {{{
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico" ]; then
|
||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico" ]]; then
|
||||
wget "https://raw.githubusercontent.com/VSCodium/icons/main/icons/win32/nobg/${COLOR}/paulo22s.ico" -O "${SRC_PREFIX}src/${QUALITY}/resources/win32/code.ico"
|
||||
fi
|
||||
} # }}}
|
||||
|
||||
build_windows_type() {
|
||||
local FILE_PATH IMG_SIZE IMG_BG_COLOR LOGO_SIZE GRAVITY
|
||||
|
||||
FILE_PATH="$1"
|
||||
IMG_SIZE="$2"
|
||||
IMG_BG_COLOR="$3"
|
||||
LOGO_SIZE="$4"
|
||||
GRAVITY="$5"
|
||||
|
||||
if [[ ! -f "${FILE_PATH}" ]]; then
|
||||
if [[ "${FILE_PATH##*.}" == "png" ]]; then
|
||||
convert -size "${IMG_SIZE}" "${IMG_BG_COLOR}" PNG32:"${FILE_PATH}"
|
||||
else
|
||||
convert -size "${IMG_SIZE}" "${IMG_BG_COLOR}" "${FILE_PATH}"
|
||||
fi
|
||||
|
||||
rsvg-convert -w "${LOGO_SIZE}" -h "${LOGO_SIZE}" "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
|
||||
composite -gravity "${GRAVITY}" "code_logo.png" "${FILE_PATH}" "${FILE_PATH}"
|
||||
fi
|
||||
}
|
||||
|
||||
build_windows_types() { # {{{
|
||||
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/win32"
|
||||
|
||||
rsvg-convert -b "#F5F6F7" -w 64 -h 64 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/win32/*.ico
|
||||
do
|
||||
if [ -f "${file}" ]; then
|
||||
for file in "${VSCODE_PREFIX}"vscode/resources/win32/*.ico; do
|
||||
if [[ -f "${file}" ]]; then
|
||||
name=$(basename "${file}" '.ico')
|
||||
|
||||
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/${name}.ico" ]; then
|
||||
if [[ "${name}" != 'code' ]] && [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/${name}.ico" ]]; then
|
||||
icotool -x -w 256 "${file}"
|
||||
|
||||
composite -geometry +150+185 "code_logo.png" "${name}_9_256x256x32.png" "${name}.png"
|
||||
|
@ -122,105 +143,29 @@ build_windows_types() { # {{{
|
|||
fi
|
||||
done
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" ]; then
|
||||
convert -size 70x70 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
||||
rsvg-convert -w 45 -h 45 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" ]; then
|
||||
convert -size 150x150 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png"
|
||||
rsvg-convert -w 64 -h 64 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +44+25 "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" ]; then
|
||||
convert -size 164x314 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp"
|
||||
rsvg-convert -w 126 -h 126 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" ]; then
|
||||
convert -size 192x386 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp"
|
||||
rsvg-convert -w 147 -h 147 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" ]; then
|
||||
convert -size 246x459 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp"
|
||||
rsvg-convert -w 190 -h 190 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" ]; then
|
||||
convert -size 273x556 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp"
|
||||
rsvg-convert -w 211 -h 211 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" ]; then
|
||||
convert -size 328x604 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp"
|
||||
rsvg-convert -w 255 -h 255 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" ]; then
|
||||
convert -size 355x700 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp"
|
||||
rsvg-convert -w 273 -h 273 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" ]; then
|
||||
convert -size 410x797 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp"
|
||||
rsvg-convert -w 317 -h 317 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" ]; then
|
||||
convert -size 55x55 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp"
|
||||
rsvg-convert -w 44 -h 44 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" ]; then
|
||||
convert -size 64x68 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp"
|
||||
rsvg-convert -w 52 -h 52 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" ]; then
|
||||
convert -size 83x80 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp"
|
||||
rsvg-convert -w 63 -h 63 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" ]; then
|
||||
convert -size 92x97 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp"
|
||||
rsvg-convert -w 76 -h 76 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" ]; then
|
||||
convert -size 110x106 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp"
|
||||
rsvg-convert -w 86 -h 86 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" ]; then
|
||||
convert -size 119x123 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp"
|
||||
rsvg-convert -w 103 -h 103 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" ]; then
|
||||
convert -size 138x140 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp"
|
||||
rsvg-convert -w 116 -h 116 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" ]; then
|
||||
convert -size 493x58 xc:white "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp"
|
||||
rsvg-convert -w 50 -h 50 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +438+6 "code_logo.png" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp"
|
||||
fi
|
||||
if [ ! -f "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" ]; then
|
||||
convert -size 493x312 xc:white "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp"
|
||||
rsvg-convert -w 120 -h 120 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
||||
composite -geometry +22+152 "code_logo.png" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp"
|
||||
fi
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "70x70" "canvas:transparent" "45" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" "150x150" "canvas:transparent" "64" "+44+25"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" "164x314" "xc:white" "126" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" "192x386" "xc:white" "147" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-150.bmp" "246x459" "xc:white" "190" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-175.bmp" "273x556" "xc:white" "211" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" "328x604" "xc:white" "255" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" "355x700" "xc:white" "273" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" "410x797" "xc:white" "317" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" "55x55" "xc:white" "44" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-125.bmp" "64x68" "xc:white" "52" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-150.bmp" "83x80" "xc:white" "63" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" "92x97" "xc:white" "76" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" "110x106" "xc:white" "86" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" "119x123" "xc:white" "103" "center"
|
||||
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" "138x140" "xc:white" "116" "center"
|
||||
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" "493x58" "xc:white" "50" "+438+6"
|
||||
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "493x312" "xc:white" "120" "+22+152"
|
||||
|
||||
rm code_logo.png
|
||||
} # }}}
|
||||
|
||||
if [ "${0}" == "${BASH_SOURCE}" ];
|
||||
then
|
||||
if [[ "${0}" == "${BASH_SOURCE[0]}" ]]; then
|
||||
build_darwin_main
|
||||
build_linux_main
|
||||
build_windows_main
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
|
||||
GH_ARCH="amd64"
|
||||
|
||||
VERSION=`curl --retry 12 --retry-delay 30 "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`
|
||||
VERSION=$( curl --retry 12 --retry-delay 30 "https://api.github.com/repos/cli/cli/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2- )
|
||||
|
||||
curl --retry 12 --retry-delay 120 -sSL "https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_${GH_ARCH}.tar.gz" -o "gh_${VERSION}_linux_${GH_ARCH}.tar.gz"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
|
4
patch.sh
4
patch.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "${1}" == *patch ]]; then
|
||||
FILE="../patches/${1}"
|
||||
|
@ -17,7 +17,7 @@ fi
|
|||
|
||||
git apply --reject "../patches/helper/settings.patch"
|
||||
|
||||
read -p "Press any key when the conflict have been resolved..." -n1 -s
|
||||
read -rp "Press any key when the conflict have been resolved..." -n1 -s
|
||||
|
||||
git restore .vscode/settings.json
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
APP_NAME_LC=$( echo "${APP_NAME}" | awk '{print tolower($0)}' )
|
||||
APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )"
|
||||
|
||||
npm install -g checksum
|
||||
|
||||
|
@ -29,7 +30,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then
|
|||
security create-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security set-keychain-settings -lut 21600 "${KEYCHAIN}"
|
||||
security unlock-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security list-keychains -s `security list-keychains | xargs` "${KEYCHAIN}"
|
||||
security list-keychains -s "$(security list-keychains | xargs)" "${KEYCHAIN}"
|
||||
# security list-keychains -d user
|
||||
# security show-keychain-info ${KEYCHAIN}
|
||||
|
||||
|
@ -179,8 +180,7 @@ fi
|
|||
|
||||
cd assets
|
||||
|
||||
for FILE in *
|
||||
do
|
||||
for FILE in *; do
|
||||
if [[ -f "${FILE}" ]]; then
|
||||
sum_file "${FILE}"
|
||||
fi
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,2154
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -21,33 +22,30 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
|||
{ set +x; } 2>/dev/null
|
||||
|
||||
for file in ../patches/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
for file in ../patches/insider/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
for file in ../patches/user/*.patch; do
|
||||
if [ -f "${file}" ]; then
|
||||
if [[ -f "${file}" ]]; then
|
||||
echo applying user patch: "${file}";
|
||||
git apply --ignore-whitespace "${file}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo failed to apply patch "${file}" 1>&2
|
||||
if ! git apply --ignore-whitespace "${file}"; then
|
||||
echo failed to apply patch "${file}" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -75,7 +73,8 @@ else
|
|||
git checkout 102b347da0c92c29f9c67df22e864e70249cf086
|
||||
npm install
|
||||
|
||||
export npm_config_node_gyp=`pwd`
|
||||
npm_config_node_gyp=$( pwd )
|
||||
export npm_config_node_gyp
|
||||
|
||||
cd ../..
|
||||
fi
|
||||
|
@ -84,19 +83,23 @@ else
|
|||
fi
|
||||
|
||||
setpath() {
|
||||
local jsonTmp
|
||||
{ set +x; } 2>/dev/null
|
||||
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||
jsonTmp=$( jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' "${1}.json" )
|
||||
echo "${jsonTmp}" > "${1}.json"
|
||||
set -x
|
||||
}
|
||||
|
||||
setpath_json() {
|
||||
local jsonTmp
|
||||
{ set +x; } 2>/dev/null
|
||||
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --argjson 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||
jsonTmp=$( jq --arg 'path' "${2}" --argjson 'value' "${3}" 'setpath([$path]; $value)' "${1}.json" )
|
||||
echo "${jsonTmp}" > "${1}.json"
|
||||
set -x
|
||||
}
|
||||
|
||||
# product.json
|
||||
cp product.json product.json.bak
|
||||
cp product.json{,.bak}
|
||||
|
||||
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
||||
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
||||
|
@ -165,20 +168,21 @@ else
|
|||
setpath "product" "win32arm64UserAppId" "{{57FD70A5-1B8D-4875-9F40-C5553F094828}"
|
||||
fi
|
||||
|
||||
echo "$( jq -s '.[0] * .[1]' product.json ../product.json )" > product.json
|
||||
jsonTmp=$( jq -s '.[0] * .[1]' product.json ../product.json )
|
||||
echo "${jsonTmp}" > product.json && unset jsonTmp
|
||||
|
||||
cat product.json
|
||||
|
||||
# package.json
|
||||
cp package.json package.json.bak
|
||||
cp package.json{,.bak}
|
||||
|
||||
setpath "package" "version" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\1/p" )
|
||||
setpath "package" "release" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )
|
||||
setpath "package" "version" "$( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\1/p" )"
|
||||
setpath "package" "release" "$( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )"
|
||||
|
||||
replace 's|Microsoft Corporation|VSCodium|' package.json
|
||||
|
||||
# announcements
|
||||
replace "s|\\[\\/\\* BUILTIN_ANNOUNCEMENTS \\*\\/\\]|$( cat ../announcements-builtin.json | tr -d '\n' )|" src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
replace "s|\\[\\/\\* BUILTIN_ANNOUNCEMENTS \\*\\/\\]|$( tr -d '\n' < ../announcements-builtin.json )|" src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.ts
|
||||
|
||||
../undo_telemetry.sh
|
||||
|
||||
|
|
10
release.sh
10
release.sh
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -19,7 +19,7 @@ if [[ $( gh release view --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" 2>&1
|
|||
NOTES="update vscode to [${MS_COMMIT}](https://github.com/microsoft/vscode/tree/${MS_COMMIT})"
|
||||
CREATE_OPTIONS=""
|
||||
else
|
||||
NOTES="update vscode to [${MS_TAG}](https://code.visualstudio.com/updates/v$( echo ${MS_TAG//./_} | cut -d'_' -f 1,2 ))"
|
||||
NOTES="update vscode to [${MS_TAG}](https://code.visualstudio.com/updates/v$( echo "${MS_TAG//./_}" | cut -d'_' -f 1,2 ))"
|
||||
CREATE_OPTIONS="--generate-notes"
|
||||
fi
|
||||
|
||||
|
@ -30,8 +30,7 @@ cd assets
|
|||
|
||||
set +e
|
||||
|
||||
for FILE in *
|
||||
do
|
||||
for FILE in *; do
|
||||
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
|
||||
gh release upload --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
@ -40,8 +39,7 @@ do
|
|||
echo "exit: ${EXIT_STATUS}"
|
||||
|
||||
if (( "${EXIT_STATUS}" )); then
|
||||
for (( i=0; i<10; i++ ))
|
||||
do
|
||||
for (( i=0; i<10; i++ )); do
|
||||
github-release delete --owner "${REPOSITORY_OWNER}" --repo "${REPOSITORY_NAME}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
||||
sleep $(( 15 * (i + 1)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -12,11 +12,11 @@ sudo snap install --channel stable --classic snapcraft
|
|||
|
||||
echo "Architecture: ${ARCHITECTURE}"
|
||||
|
||||
SNAP_VERSION=$(snapcraft list-revisions ${SNAP_NAME} | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4)
|
||||
SNAP_VERSION=$( snapcraft list-revisions "${SNAP_NAME}" | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4 )
|
||||
echo "Snap version: ${SNAP_VERSION}"
|
||||
|
||||
wget --quiet "https://api.github.com/repos/${ASSETS_REPOSITORY}/releases" -O gh_latest.json
|
||||
GH_VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json)
|
||||
GH_VERSION=$( jq -r 'sort_by(.tag_name)|last.tag_name' gh_latest.json )
|
||||
echo "GH version: ${GH_VERSION}"
|
||||
|
||||
rm -f gh_latest.json
|
||||
|
@ -27,7 +27,7 @@ else
|
|||
export SHOULD_DEPLOY="yes"
|
||||
|
||||
snap version
|
||||
snap info "${SNAP_NAME}" | true
|
||||
snap info "${SNAP_NAME}" || true
|
||||
fi
|
||||
|
||||
if [[ "${GITHUB_ENV}" ]]; then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,SC2016
|
||||
|
||||
set -ex
|
||||
|
||||
|
@ -25,7 +26,7 @@ else
|
|||
fi
|
||||
export -f replace_with_debug
|
||||
|
||||
d1=`date +%s`
|
||||
d1=$( date +%s )
|
||||
|
||||
if [[ "${OS_NAME}" == "linux" ]]; then
|
||||
if [[ ${VSCODE_ARCH} == "x64" ]]; then
|
||||
|
@ -39,6 +40,6 @@ else
|
|||
./node_modules/@vscode/ripgrep/bin/rg --no-ignore --path-separator=// -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
|
||||
fi
|
||||
|
||||
d2=`date +%s`
|
||||
d2=$( date +%s )
|
||||
|
||||
echo "undo_telemetry: $( echo $((${d2} - ${d1})) )s"
|
||||
echo "undo_telemetry: $((d2 - d1))s"
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||
echo "Will not update version JSON because we did not build"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not update insider.json because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
|
||||
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
||||
echo "${jsonTmp}" > "insider.json" && unset jsonTmp
|
||||
|
||||
git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com"
|
||||
git config user.name "${GITHUB_USERNAME} CI"
|
||||
|
@ -20,7 +21,7 @@ git add .
|
|||
|
||||
CHANGES=$( git status --porcelain )
|
||||
|
||||
if [[ ! -z "${CHANGES}" ]]; then
|
||||
if [[ -n "${CHANGES}" ]]; then
|
||||
git commit -m "build(insider): update to commit ${MS_COMMIT:0:7}"
|
||||
|
||||
if ! git push origin insider --quiet; then
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# shellcheck disable=SC1091,2148
|
||||
|
||||
DEFAULT_TRUE="'default': true"
|
||||
DEFAULT_FALSE="'default': false"
|
||||
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||
|
@ -10,23 +12,25 @@ NLS=workbench.settings.enableNaturalLanguageSearch
|
|||
. ../utils.sh
|
||||
|
||||
update_setting () {
|
||||
local FILENAME="${2}"
|
||||
local FILENAME SETTING LINE_NUM IN_SETTING FOUND DEFAULT_TRUE_TO_FALSE
|
||||
|
||||
FILENAME="${2}"
|
||||
# check that the file exists
|
||||
if [ ! -f "${FILENAME}" ]; then
|
||||
if [[ ! -f "${FILENAME}" ]]; then
|
||||
echo "File to update setting in does not exist ${FILENAME}"
|
||||
return
|
||||
fi
|
||||
|
||||
# go through lines of file, looking for block that contains setting
|
||||
local SETTING="${1}"
|
||||
local LINE_NUM=0
|
||||
SETTING="${1}"
|
||||
LINE_NUM=0
|
||||
while read -r line; do
|
||||
local LINE_NUM=$(( $LINE_NUM + 1 ))
|
||||
LINE_NUM=$(( LINE_NUM + 1 ))
|
||||
if [[ "${line}" == *"${SETTING}"* ]]; then
|
||||
local IN_SETTING=1
|
||||
IN_SETTING=1
|
||||
fi
|
||||
if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then
|
||||
local FOUND=1
|
||||
FOUND=1
|
||||
break
|
||||
fi
|
||||
done < "${FILENAME}"
|
||||
|
@ -38,9 +42,9 @@ update_setting () {
|
|||
|
||||
# construct line-aware replacement string
|
||||
if [[ "${line}" == *"${DEFAULT_TRUE}"* ]]; then
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||
DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
|
||||
else
|
||||
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||
DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
|
||||
fi
|
||||
|
||||
replace "${DEFAULT_TRUE_TO_FALSE}" "${FILENAME}"
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${SHOULD_BUILD}" != "yes" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||
echo "Will not update version JSON because we did not build"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||
echo "Will not update version JSON because no GITHUB_TOKEN defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${FORCE_UPDATE}" == "true" ]]; then
|
||||
|
@ -18,12 +19,12 @@ fi
|
|||
|
||||
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||
echo "Will not update version JSON because no BUILD_SOURCEVERSION defined"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
||||
echo "Skip ppc64le since only reh is published"
|
||||
exit
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# {
|
||||
|
@ -49,22 +50,23 @@ REPOSITORY_NAME="${VERSIONS_REPOSITORY/*\//}"
|
|||
URL_BASE="https://github.com/${ASSETS_REPOSITORY}/releases/download/${RELEASE_VERSION}"
|
||||
|
||||
generateJson() {
|
||||
local url name version productVersion sha1hash sha256hash timestamp
|
||||
JSON_DATA="{}"
|
||||
|
||||
# generate parts
|
||||
local url="${URL_BASE}/${ASSET_NAME}"
|
||||
local name="${RELEASE_VERSION}"
|
||||
local version="${BUILD_SOURCEVERSION}"
|
||||
local productVersion="${RELEASE_VERSION}"
|
||||
local timestamp=$(node -e 'console.log(Date.now())')
|
||||
url="${URL_BASE}/${ASSET_NAME}"
|
||||
name="${RELEASE_VERSION}"
|
||||
version="${BUILD_SOURCEVERSION}"
|
||||
productVersion="${RELEASE_VERSION}"
|
||||
timestamp=$( node -e 'console.log(Date.now())' )
|
||||
|
||||
if [[ ! -f "assets/${ASSET_NAME}" ]]; then
|
||||
echo "Downloading asset '${ASSET_NAME}'"
|
||||
gh release download --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" --dir "assets" --pattern "${ASSET_NAME}*"
|
||||
fi
|
||||
|
||||
local sha1hash=$(cat "assets/${ASSET_NAME}.sha1" | awk '{ print $1 }')
|
||||
local sha256hash=$(cat "assets/${ASSET_NAME}.sha256" | awk '{ print $1 }')
|
||||
sha1hash=$( awk '{ print $1 }' "assets/${ASSET_NAME}.sha1" )
|
||||
sha256hash=$( awk '{ print $1 }' "assets/${ASSET_NAME}.sha256" )
|
||||
|
||||
# check that nothing is blank (blank indicates something awry with build)
|
||||
for key in url name version productVersion sha1hash timestamp sha256hash; do
|
||||
|
@ -75,7 +77,7 @@ generateJson() {
|
|||
done
|
||||
|
||||
# generate json
|
||||
JSON_DATA=$(jq \
|
||||
JSON_DATA=$( jq \
|
||||
--arg url "${url}" \
|
||||
--arg name "${name}" \
|
||||
--arg version "${version}" \
|
||||
|
@ -84,7 +86,7 @@ generateJson() {
|
|||
--arg timestamp "${timestamp}" \
|
||||
--arg sha256hash "${sha256hash}" \
|
||||
'. | .url=$url | .name=$name | .version=$version | .productVersion=$productVersion | .hash=$hash | .timestamp=$timestamp | .sha256hash=$sha256hash' \
|
||||
<<<'{}')
|
||||
<<<'{}' )
|
||||
}
|
||||
|
||||
updateLatestVersion() {
|
||||
|
@ -96,7 +98,7 @@ updateLatestVersion() {
|
|||
echo "CURRENT_VERSION: ${CURRENT_VERSION}"
|
||||
|
||||
if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||
return
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -118,7 +120,7 @@ cd "${REPOSITORY_NAME}" || { echo "'${REPOSITORY_NAME}' dir not found"; exit 1;
|
|||
git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com"
|
||||
git config user.name "${GITHUB_USERNAME} CI"
|
||||
git remote rm origin
|
||||
git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPOSITORY}.git" > /dev/null 2>&1
|
||||
git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${VERSIONS_REPOSITORY}.git" &> /dev/null
|
||||
cd ..
|
||||
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
|
@ -168,7 +170,7 @@ git add .
|
|||
|
||||
CHANGES=$( git status --porcelain )
|
||||
|
||||
if [[ ! -z "${CHANGES}" ]]; then
|
||||
if [[ -n "${CHANGES}" ]]; then
|
||||
echo "Some changes have been found, pushing them"
|
||||
|
||||
dateAndMonth=$( date "+%D %T" )
|
||||
|
|
6
utils.sh
6
utils.sh
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# All common functions can be added to this file
|
||||
|
||||
exists() { type -t "$1" > /dev/null 2>&1; }
|
||||
exists() { type -t "$1" &> /dev/null; }
|
||||
|
||||
is_gnu_sed () {
|
||||
sed --version >/dev/null 2>&1
|
||||
sed --version &> /dev/null
|
||||
}
|
||||
|
||||
replace () {
|
||||
|
|
10
version.sh
10
version.sh
|
@ -1,13 +1,13 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||
|
||||
if type -t "sha1sum" > /dev/null 2>&1; then
|
||||
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
|
||||
if type -t "sha1sum" &> /dev/null; then
|
||||
BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | sha1sum | cut -d' ' -f1 )
|
||||
else
|
||||
npm install -g checksum
|
||||
|
||||
export BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
|
||||
BUILD_SOURCEVERSION=$( echo "${RELEASE_VERSION/-*/}" | checksum )
|
||||
fi
|
||||
|
||||
echo "BUILD_SOURCEVERSION=\"${BUILD_SOURCEVERSION}\""
|
||||
|
@ -17,3 +17,5 @@ if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
|||
echo "BUILD_SOURCEVERSION=${BUILD_SOURCEVERSION}" >> "${GITHUB_ENV}"
|
||||
fi
|
||||
fi
|
||||
|
||||
export BUILD_SOURCEVERSION
|
Loading…
Reference in a new issue