mirror of
https://github.com/VSCodium/vscodium.git
synced 2024-09-11 06:45:28 +03:00
refactor: shell optimizations
This commit is contained in:
parent
1c0c30e6d6
commit
79baded01d
4
build.sh
4
build.sh
@ -30,7 +30,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
|||||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||||
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
|
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"
|
VSCODE_PLATFORM="darwin"
|
||||||
elif [[ "${OS_NAME}" == "windows" ]]; then
|
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||||
@ -48,7 +48,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
|||||||
else # linux
|
else # linux
|
||||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
|
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"
|
VSCODE_PLATFORM="linux"
|
||||||
fi
|
fi
|
||||||
|
@ -15,11 +15,11 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wget -c "${APPIMAGE_URL}" -o pkg2appimage.AppImage
|
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
|
# 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
|
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun
|
||||||
|
@ -49,7 +49,7 @@ fi
|
|||||||
sed -i "s|@@PRODUCT_UPGRADE_CODE@@|${PRODUCT_UPGRADE_CODE}|g" .\\includes\\vscodium-variables.wxi
|
sed -i "s|@@PRODUCT_UPGRADE_CODE@@|${PRODUCT_UPGRADE_CODE}|g" .\\includes\\vscodium-variables.wxi
|
||||||
sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" .\\vscodium.xsl
|
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() {
|
BuildSetupTranslationTransform() {
|
||||||
local CULTURE=${1}
|
local CULTURE=${1}
|
||||||
|
@ -5,10 +5,10 @@ set -e
|
|||||||
|
|
||||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
echo "Will not build because no GITHUB_TOKEN defined"
|
echo "Will not build because no GITHUB_TOKEN defined"
|
||||||
exit
|
exit 0
|
||||||
fi
|
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" )
|
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' )
|
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
|
||||||
|
|
||||||
@ -58,21 +58,21 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
|
if contains "${APP_NAME}-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"; then
|
||||||
echo "Building on MacOS because we have no ZIP"
|
echo "Building on MacOS because we have no ZIP"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_ZIP="no"
|
export SHOULD_BUILD_ZIP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains ".${VSCODE_ARCH}.${RELEASE_VERSION}.dmg" ) ]]; then
|
if contains ".${VSCODE_ARCH}.${RELEASE_VERSION}.dmg"; then
|
||||||
echo "Building on MacOS because we have no DMG"
|
echo "Building on MacOS because we have no DMG"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_DMG="no"
|
export SHOULD_BUILD_DMG="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on MacOS because we have no REH archive"
|
echo "Building on MacOS because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -86,21 +86,21 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# windows-arm64
|
# windows-arm64
|
||||||
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
||||||
if [[ -z $( contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows arm64 because we have no system setup"
|
echo "Building on Windows arm64 because we have no system setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_SYS="no"
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows arm64 because we have no user setup"
|
echo "Building on Windows arm64 because we have no user setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_USR="no"
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
|
if contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"; then
|
||||||
echo "Building on Windows arm64 because we have no zip"
|
echo "Building on Windows arm64 because we have no zip"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -115,42 +115,42 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# windows-ia32
|
# windows-ia32
|
||||||
elif [[ "${VSCODE_ARCH}" == "ia32" ]]; then
|
elif [[ "${VSCODE_ARCH}" == "ia32" ]]; then
|
||||||
if [[ -z $( contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows ia32 because we have no system setup"
|
echo "Building on Windows ia32 because we have no system setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_SYS="no"
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows ia32 because we have no user setup"
|
echo "Building on Windows ia32 because we have no user setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_USR="no"
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
|
if contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"; then
|
||||||
echo "Building on Windows ia32 because we have no zip"
|
echo "Building on Windows ia32 because we have no zip"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_ZIP="no"
|
export SHOULD_BUILD_ZIP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" ) ]]; then
|
if contains "${APP_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}.msi"; then
|
||||||
echo "Building on Windows ia32 because we have no msi"
|
echo "Building on Windows ia32 because we have no msi"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_MSI="no"
|
export SHOULD_BUILD_MSI="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" ) ]]; then
|
if contains "${APP_NAME}-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi"; then
|
||||||
echo "Building on Windows ia32 because we have no updates-disabled msi"
|
echo "Building on Windows ia32 because we have no updates-disabled msi"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_MSI_NOUP="no"
|
export SHOULD_BUILD_MSI_NOUP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Windows ia32 because we have no REH archive"
|
echo "Building on Windows ia32 because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -163,42 +163,42 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# windows-x64
|
# windows-x64
|
||||||
else
|
else
|
||||||
if [[ -z $( contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "${APP_NAME}Setup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows x64 because we have no system setup"
|
echo "Building on Windows x64 because we have no system setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_SYS="no"
|
export SHOULD_BUILD_EXE_SYS="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
|
if contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"; then
|
||||||
echo "Building on Windows x64 because we have no user setup"
|
echo "Building on Windows x64 because we have no user setup"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_EXE_USR="no"
|
export SHOULD_BUILD_EXE_USR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
|
if contains "${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"; then
|
||||||
echo "Building on Windows x64 because we have no zip"
|
echo "Building on Windows x64 because we have no zip"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_ZIP="no"
|
export SHOULD_BUILD_ZIP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" ) ]]; then
|
if contains "${APP_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}.msi"; then
|
||||||
echo "Building on Windows x64 because we have no msi"
|
echo "Building on Windows x64 because we have no msi"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_MSI="no"
|
export SHOULD_BUILD_MSI="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" ) ]]; then
|
if contains "${APP_NAME}-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi"; then
|
||||||
echo "Building on Windows x64 because we have no updates-disabled msi"
|
echo "Building on Windows x64 because we have no updates-disabled msi"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_MSI_NOUP="no"
|
export SHOULD_BUILD_MSI_NOUP="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Windows x64 because we have no REH archive"
|
echo "Building on Windows x64 because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -213,28 +213,28 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# linux-arm64
|
# linux-arm64
|
||||||
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
|
||||||
if [[ -z $( contains "arm64.deb" ) ]]; then
|
if contains "arm64.deb"; then
|
||||||
echo "Building on Linux arm64 because we have no DEB"
|
echo "Building on Linux arm64 because we have no DEB"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_DEB="no"
|
export SHOULD_BUILD_DEB="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "aarch64.rpm" ) ]]; then
|
if contains "aarch64.rpm"; then
|
||||||
echo "Building on Linux arm64 because we have no RPM"
|
echo "Building on Linux arm64 because we have no RPM"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_RPM="no"
|
export SHOULD_BUILD_RPM="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME}-linux-arm64-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux arm64 because we have no TAR"
|
echo "Building on Linux arm64 because we have no TAR"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_TAR="no"
|
export SHOULD_BUILD_TAR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-linux-arm64-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux arm64 because we have no REH archive"
|
echo "Building on Linux arm64 because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -249,28 +249,28 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# linux-armhf
|
# linux-armhf
|
||||||
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
|
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
|
||||||
if [[ -z $( contains "armhf.deb" ) ]]; then
|
if contains "armhf.deb"; then
|
||||||
echo "Building on Linux arm because we have no DEB"
|
echo "Building on Linux arm because we have no DEB"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_DEB="no"
|
export SHOULD_BUILD_DEB="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "armv7hl.rpm" ) ]]; then
|
if contains "armv7hl.rpm"; then
|
||||||
echo "Building on Linux arm because we have no RPM"
|
echo "Building on Linux arm because we have no RPM"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_RPM="no"
|
export SHOULD_BUILD_RPM="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME}-linux-armhf-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux arm because we have no TAR"
|
echo "Building on Linux arm because we have no TAR"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_TAR="no"
|
export SHOULD_BUILD_TAR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-linux-armhf-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux arm because we have no REH archive"
|
echo "Building on Linux arm because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -290,7 +290,7 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
SHOULD_BUILD_RPM="no"
|
SHOULD_BUILD_RPM="no"
|
||||||
SHOULD_BUILD_TAR="no"
|
SHOULD_BUILD_TAR="no"
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-linux-ppc64le-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux PowerPC64LE because we have no REH archive"
|
echo "Building on Linux PowerPC64LE because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
@ -303,35 +303,35 @@ if [[ "${ASSETS}" != "null" ]]; then
|
|||||||
|
|
||||||
# linux-x64
|
# linux-x64
|
||||||
else
|
else
|
||||||
if [[ -z $( contains "amd64.deb" ) ]]; then
|
if contains "amd64.deb"; then
|
||||||
echo "Building on Linux x64 because we have no DEB"
|
echo "Building on Linux x64 because we have no DEB"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_DEB="no"
|
export SHOULD_BUILD_DEB="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "x86_64.rpm" ) ]]; then
|
if contains "x86_64.rpm"; then
|
||||||
echo "Building on Linux x64 because we have no RPM"
|
echo "Building on Linux x64 because we have no RPM"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_RPM="no"
|
export SHOULD_BUILD_RPM="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME}-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME}-linux-x64-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux x64 because we have no TAR"
|
echo "Building on Linux x64 because we have no TAR"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_TAR="no"
|
export SHOULD_BUILD_TAR="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "x86_64.AppImage" ) ]]; then
|
if contains "x86_64.AppImage"; then
|
||||||
echo "Building on Linux x64 because we have no AppImage"
|
echo "Building on Linux x64 because we have no AppImage"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
export SHOULD_BUILD_APPIMAGE="no"
|
export SHOULD_BUILD_APPIMAGE="no"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $( contains "${APP_NAME_LC}-reh-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then
|
if contains "${APP_NAME_LC}-reh-linux-x64-${RELEASE_VERSION}.tar.gz"; then
|
||||||
echo "Building on Linux x64 because we have no REH archive"
|
echo "Building on Linux x64 because we have no REH archive"
|
||||||
export SHOULD_BUILD="yes"
|
export SHOULD_BUILD="yes"
|
||||||
else
|
else
|
||||||
|
@ -24,7 +24,7 @@ check_programs() { # {{{
|
|||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if ! command -v "${arg}" &> /dev/null; then
|
if ! command -v "${arg}" &> /dev/null; then
|
||||||
echo "${arg} could not be found"
|
echo "${arg} could not be found"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
} # }}}
|
} # }}}
|
||||||
@ -37,7 +37,7 @@ SRC_PREFIX=""
|
|||||||
VSCODE_PREFIX=""
|
VSCODE_PREFIX=""
|
||||||
|
|
||||||
build_darwin_main() { # {{{
|
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"
|
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"
|
composite "code_logo.png" -gravity center "icons/template_macos.png" "code_1024.png"
|
||||||
convert "code_1024.png" -resize 512x512 code_512.png
|
convert "code_1024.png" -resize 512x512 code_512.png
|
||||||
@ -57,7 +57,7 @@ build_darwin_types() { # {{{
|
|||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
name=$(basename "${file}" '.icns')
|
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 .
|
icns2png -x -s 512x512 "${file}" -o .
|
||||||
|
|
||||||
composite -blend 100% -geometry +323+365 "icons/corner_512.png" "${name}_512x512x32.png" "${name}.png"
|
composite -blend 100% -geometry +323+365 "icons/corner_512.png" "${name}_512x512x32.png" "${name}.png"
|
||||||
@ -100,6 +100,28 @@ build_windows_main() { # {{{
|
|||||||
fi
|
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() { # {{{
|
build_windows_types() { # {{{
|
||||||
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/win32"
|
mkdir -p "${SRC_PREFIX}src/${QUALITY}/resources/win32"
|
||||||
|
|
||||||
@ -109,7 +131,7 @@ build_windows_types() { # {{{
|
|||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
name=$(basename "${file}" '.ico')
|
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}"
|
icotool -x -w 256 "${file}"
|
||||||
|
|
||||||
composite -geometry +150+185 "code_logo.png" "${name}_9_256x256x32.png" "${name}.png"
|
composite -geometry +150+185 "code_logo.png" "${name}_9_256x256x32.png" "${name}.png"
|
||||||
@ -121,99 +143,24 @@ build_windows_types() { # {{{
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" ]]; then
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "70x70" "canvas:transparent" "45" "center"
|
||||||
convert -size 70x70 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" "150x150" "canvas:transparent" "64" "+44+25"
|
||||||
rsvg-convert -w 45 -h 45 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" "164x314" "xc:white" "126" "center"
|
||||||
composite -gravity center "code_logo.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png" "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_70x70.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" "192x386" "xc:white" "147" "center"
|
||||||
fi
|
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"
|
||||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png" ]]; then
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-200.bmp" "328x604" "xc:white" "255" "center"
|
||||||
convert -size 150x150 canvas:transparent PNG32:"${SRC_PREFIX}src/${QUALITY}/resources/win32/code_150x150.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-225.bmp" "355x700" "xc:white" "273" "center"
|
||||||
rsvg-convert -w 64 -h 64 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-250.bmp" "410x797" "xc:white" "317" "center"
|
||||||
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"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-100.bmp" "55x55" "xc:white" "44" "center"
|
||||||
fi
|
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"
|
||||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp" ]]; then
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-175.bmp" "92x97" "xc:white" "76" "center"
|
||||||
convert -size 164x314 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-100.bmp"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-200.bmp" "110x106" "xc:white" "86" "center"
|
||||||
rsvg-convert -w 126 -h 126 "icons/${QUALITY}/codium_cnl.svg" -o "code_logo.png"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-225.bmp" "119x123" "xc:white" "103" "center"
|
||||||
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"
|
build_windows_type "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp" "138x140" "xc:white" "116" "center"
|
||||||
fi
|
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-banner.bmp" "493x58" "xc:white" "50" "+438+6"
|
||||||
if [[ ! -f "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-big-125.bmp" ]]; then
|
build_windows_type "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "493x312" "xc:white" "120" "+22+152"
|
||||||
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
|
|
||||||
|
|
||||||
rm code_logo.png
|
rm code_logo.png
|
||||||
} # }}}
|
} # }}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
set -e
|
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
|
npm install -g checksum
|
||||||
|
|
||||||
@ -180,8 +180,7 @@ fi
|
|||||||
|
|
||||||
cd assets
|
cd assets
|
||||||
|
|
||||||
for FILE in *
|
for FILE in *; do
|
||||||
do
|
|
||||||
if [[ -f "${FILE}" ]]; then
|
if [[ -f "${FILE}" ]]; then
|
||||||
sum_file "${FILE}"
|
sum_file "${FILE}"
|
||||||
fi
|
fi
|
||||||
|
@ -25,7 +25,7 @@ for file in ../patches/*.patch; do
|
|||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
echo applying patch: "${file}";
|
echo applying patch: "${file}";
|
||||||
if ! git apply --ignore-whitespace "${file}"; then
|
if ! git apply --ignore-whitespace "${file}"; then
|
||||||
echo failed to apply patch "${file}" 1>&2
|
echo failed to apply patch "${file}" >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -35,7 +35,7 @@ if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
|||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
echo applying patch: "${file}";
|
echo applying patch: "${file}";
|
||||||
if ! git apply --ignore-whitespace "${file}"; then
|
if ! git apply --ignore-whitespace "${file}"; then
|
||||||
echo failed to apply patch "${file}" 1>&2
|
echo failed to apply patch "${file}" >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -45,7 +45,7 @@ for file in ../patches/user/*.patch; do
|
|||||||
if [[ -f "${file}" ]]; then
|
if [[ -f "${file}" ]]; then
|
||||||
echo applying user patch: "${file}";
|
echo applying user patch: "${file}";
|
||||||
if ! git apply --ignore-whitespace "${file}"; then
|
if ! git apply --ignore-whitespace "${file}"; then
|
||||||
echo failed to apply patch "${file}" 1>&2
|
echo failed to apply patch "${file}" >&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -99,7 +99,7 @@ setpath_json() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# product.json
|
# product.json
|
||||||
cp product.json product.json.bak
|
cp product.json{,.bak}
|
||||||
|
|
||||||
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
||||||
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
||||||
@ -169,13 +169,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
jsonTmp=$( jq -s '.[0] * .[1]' product.json ../product.json )
|
jsonTmp=$( jq -s '.[0] * .[1]' product.json ../product.json )
|
||||||
echo "${jsonTmp}" > ../product.json
|
echo "${jsonTmp}" > ../product.json && unset jsonTmp
|
||||||
unset jsonTmp
|
|
||||||
|
|
||||||
cat product.json
|
cat product.json
|
||||||
|
|
||||||
# package.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" "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" "release" "$( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )"
|
||||||
|
@ -30,8 +30,7 @@ cd assets
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
for FILE in *
|
for FILE in *; do
|
||||||
do
|
|
||||||
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
|
||||||
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
|
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
|
||||||
gh release upload --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
gh release upload --repo "${ASSETS_REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
@ -40,8 +39,7 @@ do
|
|||||||
echo "exit: ${EXIT_STATUS}"
|
echo "exit: ${EXIT_STATUS}"
|
||||||
|
|
||||||
if (( "${EXIT_STATUS}" )); then
|
if (( "${EXIT_STATUS}" )); then
|
||||||
for (( i=0; i<10; i++ ))
|
for (( i=0; i<10; i++ )); do
|
||||||
do
|
|
||||||
github-release delete --owner "${REPOSITORY_OWNER}" --repo "${REPOSITORY_NAME}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
github-release delete --owner "${REPOSITORY_OWNER}" --repo "${REPOSITORY_NAME}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||||
|
|
||||||
sleep $(( 15 * (i + 1)))
|
sleep $(( 15 * (i + 1)))
|
||||||
|
@ -4,12 +4,12 @@ set -e
|
|||||||
|
|
||||||
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
|
||||||
echo "Will not update version JSON because we did not build"
|
echo "Will not update version JSON because we did not build"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
echo "Will not update insider.json because no GITHUB_TOKEN defined"
|
echo "Will not update insider.json because no GITHUB_TOKEN defined"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
|
||||||
|
@ -12,23 +12,25 @@ NLS=workbench.settings.enableNaturalLanguageSearch
|
|||||||
. ../utils.sh
|
. ../utils.sh
|
||||||
|
|
||||||
update_setting () {
|
update_setting () {
|
||||||
local FILENAME="${2}"
|
local FILENAME SETTING LINE_NUM IN_SETTING FOUND DEFAULT_TRUE_TO_FALSE
|
||||||
|
|
||||||
|
FILENAME="${2}"
|
||||||
# check that the file exists
|
# check that the file exists
|
||||||
if [ ! -f "${FILENAME}" ]; then
|
if [[ ! -f "${FILENAME}" ]]; then
|
||||||
echo "File to update setting in does not exist ${FILENAME}"
|
echo "File to update setting in does not exist ${FILENAME}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# go through lines of file, looking for block that contains setting
|
# go through lines of file, looking for block that contains setting
|
||||||
local SETTING="${1}"
|
SETTING="${1}"
|
||||||
local LINE_NUM=0
|
LINE_NUM=0
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
local LINE_NUM=$(( LINE_NUM + 1 ))
|
LINE_NUM=$(( LINE_NUM + 1 ))
|
||||||
if [[ "${line}" == *"${SETTING}"* ]]; then
|
if [[ "${line}" == *"${SETTING}"* ]]; then
|
||||||
local IN_SETTING=1
|
IN_SETTING=1
|
||||||
fi
|
fi
|
||||||
if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then
|
if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then
|
||||||
local FOUND=1
|
FOUND=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done < "${FILENAME}"
|
done < "${FILENAME}"
|
||||||
@ -40,9 +42,9 @@ update_setting () {
|
|||||||
|
|
||||||
# construct line-aware replacement string
|
# construct line-aware replacement string
|
||||||
if [[ "${line}" == *"${DEFAULT_TRUE}"* ]]; then
|
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
|
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
|
fi
|
||||||
|
|
||||||
replace "${DEFAULT_TRUE_TO_FALSE}" "${FILENAME}"
|
replace "${DEFAULT_TRUE_TO_FALSE}" "${FILENAME}"
|
||||||
|
@ -5,12 +5,12 @@ set -e
|
|||||||
|
|
||||||
if [[ "${SHOULD_BUILD}" != "yes" && "${FORCE_UPDATE}" != "true" ]]; then
|
if [[ "${SHOULD_BUILD}" != "yes" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||||
echo "Will not update version JSON because we did not build"
|
echo "Will not update version JSON because we did not build"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
if [[ -z "${GITHUB_TOKEN}" ]]; then
|
||||||
echo "Will not update version JSON because no GITHUB_TOKEN defined"
|
echo "Will not update version JSON because no GITHUB_TOKEN defined"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${FORCE_UPDATE}" == "true" ]]; then
|
if [[ "${FORCE_UPDATE}" == "true" ]]; then
|
||||||
@ -19,12 +19,12 @@ fi
|
|||||||
|
|
||||||
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
|
||||||
echo "Will not update version JSON because no BUILD_SOURCEVERSION defined"
|
echo "Will not update version JSON because no BUILD_SOURCEVERSION defined"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
if [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
|
||||||
echo "Skip ppc64le since only reh is published"
|
echo "Skip ppc64le since only reh is published"
|
||||||
exit
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# {
|
# {
|
||||||
@ -98,7 +98,7 @@ updateLatestVersion() {
|
|||||||
echo "CURRENT_VERSION: ${CURRENT_VERSION}"
|
echo "CURRENT_VERSION: ${CURRENT_VERSION}"
|
||||||
|
|
||||||
if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
|
if [[ "${CURRENT_VERSION}" == "${RELEASE_VERSION}" && "${FORCE_UPDATE}" != "true" ]]; then
|
||||||
return
|
return 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user