feat: port back changes made inside the insider branch (#1225)

This commit is contained in:
Baptiste Augrain 2022-08-30 13:55:17 +02:00 committed by GitHub
parent 39af33e65a
commit 6da0a42a92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 86 additions and 46 deletions

View file

@ -2,6 +2,10 @@ name: insider-linux
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: Forced release version
schedule:
- cron: '0 1 * * *'
push:
@ -53,6 +57,8 @@ jobs:
run: npm install -g yarn
- name: Clone VSCode repo
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
run: ./get_repo.sh
- name: Check PR or cron
@ -95,7 +101,7 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View file

@ -2,6 +2,10 @@ name: insider-macos
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: Forced release version
schedule:
- cron: '0 1 * * *'
push:
@ -38,6 +42,8 @@ jobs:
node-version: 16
- name: Clone VSCode repo
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
run: . get_repo.sh
- name: Check PR or cron
@ -46,7 +52,6 @@ jobs:
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
run: . check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'
@ -84,7 +89,7 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View file

@ -2,6 +2,10 @@ name: insider-windows
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: Forced release version
schedule:
- cron: '0 1 * * *'
push:
@ -48,6 +52,8 @@ jobs:
python-version: '3.x'
- name: Clone VSCode repo
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
run: ./get_repo.sh
- name: Check PR or cron
@ -56,7 +62,6 @@ jobs:
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
run: ./check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'
@ -92,7 +97,7 @@ jobs:
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'

View file

@ -44,11 +44,11 @@ else
export VSCODE_ARCH="x64"
fi
echo "OS_NAME: ${OS_NAME}"
echo "SKIP_PACKAGES: ${SKIP_PACKAGES}"
echo "VSCODE_ARCH: ${VSCODE_ARCH}"
echo "VSCODE_LATEST: ${VSCODE_LATEST}"
echo "VSCODE_QUALITY: ${VSCODE_QUALITY}"
echo "OS_NAME=\"${OS_NAME}\""
echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
rm -rf vscode* VSCode*

View file

@ -40,11 +40,11 @@ else
export VSCODE_ARCH="armhf"
fi
echo "OS_NAME: ${OS_NAME}"
echo "SKIP_PACKAGES: ${SKIP_PACKAGES}"
echo "VSCODE_ARCH: ${VSCODE_ARCH}"
echo "VSCODE_LATEST: ${VSCODE_LATEST}"
echo "VSCODE_QUALITY: ${VSCODE_QUALITY}"
echo "OS_NAME=\"${OS_NAME}\""
echo "SKIP_PACKAGES=\"${SKIP_PACKAGES}\""
echo "VSCODE_ARCH=\"${VSCODE_ARCH}\""
echo "VSCODE_LATEST=\"${VSCODE_LATEST}\""
echo "VSCODE_QUALITY=\"${VSCODE_QUALITY}\""
rm -rf vscode* VSCode*

View file

@ -12,11 +12,15 @@ WIN_SDK_FULL_VERSION="10.0.17763.0"
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
PRODUCT_NAME="VSCodium - Insiders"
PRODUCT_SKU="vscodium-insiders"
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_UPGRADE_CODE="965370CD-253C-4720-82FC-2E6B02A53808"
ICON_DIR="..\\..\\..\\src\\stable\\resources\\win32"
SETUP_RESOURCES_DIR=".\\resources\\stable"
fi
PRODUCT_ID=$( powershell.exe -command "[guid]::NewGuid().ToString().ToUpper()" )
@ -26,15 +30,14 @@ CULTURE="en-us"
LANGIDS="1033"
SETUP_RELEASE_DIR=".\\releasedir"
SETUP_RESOURCES_DIR=".\\resources"
BINARY_DIR="..\\..\\..\\VSCode-win32-${VSCODE_ARCH}"
LICENSE_DIR="..\\..\\..\\vscode"
PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' )
if [[ -z "${1}" ]]; then
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}"
OUTPUT_BASE_FILENAME="VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}"
else
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${1}-${RELEASE_VERSION}"
OUTPUT_BASE_FILENAME="VSCodium-${VSCODE_ARCH}-${1}-${RELEASE_VERSION}"
fi
if [[ "${VSCODE_ARCH}" == "ia32" ]]; then
@ -43,7 +46,10 @@ else
export PLATFORM="${VSCODE_ARCH}"
fi
sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" .\\i18n\\*.wsl
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" {} \;
BuildSetupTranslationTransform() {
local CULTURE=${1}
@ -53,7 +59,7 @@ BuildSetupTranslationTransform() {
echo "Building setup translation for culture \"${CULTURE}\" with LangID \"${LANGID}\"..."
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -reusecab -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -reusecab -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" -loc "i18n\\vscodium.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\WiLangId.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" Product "${LANGID}"

View file

@ -22,6 +22,6 @@
<?define ProductManufacturerLong="$(var.AppName)" ?>
<!-- Static settings, DO NOT TOUCH or upgrades will break! -->
<?define ProductUpgradeCode="{965370CD-253C-4720-82FC-2E6B02A53808}" ?>
<?define ProductUpgradeCode="{@@PRODUCT_UPGRADE_CODE@@}" ?>
<?define RTMProductVersion="0.0.1" ?>
</Include>

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 KiB

After

Width:  |  Height:  |  Size: 451 KiB

View file

@ -11,7 +11,7 @@
</xsl:copy>
</xsl:template>
<xsl:key name="vId1ToReplace" match="wi:Component[wi:File[contains(@Source,'VSCodium.exe')]]" use="@Id"/>
<xsl:key name="vId1ToReplace" match="wi:Component[wi:File[contains(@Source,'@@PRODUCT_NAME@@.exe')]]" use="@Id"/>
<xsl:template match="node()[key('vId1ToReplace', @Id)]">
<xsl:copy>
<xsl:attribute name="Id">VSCODIUM.EXE</xsl:attribute>
@ -19,7 +19,7 @@
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="wi:Component/wi:File[contains(@Source,'VSCodium.exe')]">
<xsl:template match="wi:Component/wi:File[contains(@Source,'@@PRODUCT_NAME@@.exe')]">
<xsl:copy>
<xsl:attribute name="Id">VSCODIUM.EXE</xsl:attribute>
<xsl:copy-of select="@*[name()!='Id']"/>

View file

@ -31,6 +31,22 @@ if [[ -z "${RELEASE_VERSION}" ]]; then
else
export RELEASE_VERSION="${MS_TAG}.${date: -5}"
fi
else
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+-insider$ ]];
then
MS_TAG="${BASH_REMATCH[1]}"
else
echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}"
exit 1
fi
if [[ "${MS_TAG}" == "$(jq -r '.tag' insider.json)" ]]; then
export MS_COMMIT=$(jq -r '.commit' insider.json)
else
echo "No MS_COMMIT for ${RELEASE_VERSION}"
exit 1
fi
else
if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]];
then
@ -40,8 +56,9 @@ else
exit 1
fi
fi
fi
echo "Release version: ${RELEASE_VERSION}"
echo "RELEASE_VERSION=\"${RELEASE_VERSION}\""
mkdir -p vscode
cd vscode || { echo "'vscode' dir not found"; exit 1; }
@ -73,7 +90,8 @@ elif [[ -z "${MS_COMMIT}" ]]; then
fi
fi
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
echo "MS_TAG=\"${MS_TAG}\""
echo "MS_COMMIT=\"${MS_COMMIT}\""
git fetch --depth 1 origin "${MS_COMMIT}"
git checkout FETCH_HEAD

View file

@ -146,13 +146,13 @@ build_win32() {
convert -size 138x140 xc:white "${SRC_PREFIX}src/${QUALITY}/resources/win32/inno-small-250.bmp"
composite -size 116x -gravity center "icons/${QUALITY}/codium_only.svg" "${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/wix-banner.bmp" ]; then
convert -size 493x58 xc:white "${SRC_PREFIX}build/windows/msi/resources/wix-banner.bmp"
composite -geometry +438+6 \( "icons/${QUALITY}/codium_only.svg" -resize 50x50 \) "${SRC_PREFIX}build/windows/msi/resources/wix-banner.bmp" "${SRC_PREFIX}build/windows/msi/resources/wix-banner.bmp"
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"
composite -geometry +438+6 \( "icons/${QUALITY}/codium_only.svg" -resize 50x50 \) "${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/wix-dialog.bmp" ]; then
convert -size 493x312 xc:white "${SRC_PREFIX}build/windows/msi/resources/wix-dialog.bmp"
composite -geometry +22+152 \( "icons/${QUALITY}/codium_only.svg" -resize 120x90 \) "${SRC_PREFIX}build/windows/msi/resources/wix-dialog.bmp" "${SRC_PREFIX}build/windows/msi/resources/wix-dialog.bmp"
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"
composite -geometry +22+152 \( "icons/${QUALITY}/codium_only.svg" -resize 120x90 \) "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp" "${SRC_PREFIX}build/windows/msi/resources/${QUALITY}/wix-dialog.bmp"
fi
}

View file

@ -148,7 +148,7 @@ else
echo "Moving AppImage"
mv build/linux/appimage/out/*.AppImage* artifacts/
rename '_-_' '-' artifacts/*.AppImage
find artifacts -name '*.AppImage*' -exec bash -c 'mv $0 ${0/_-_/-}' {} \;
fi
VSCODE_PLATFORM="linux"

View file

@ -18,9 +18,9 @@ fi
npm install -g github-release-cli
if [[ $( gh release view "${RELEASE_VERSION}" 2>&1 ) =~ "release not found" ]]; then
if [[ $( gh release view --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}" 2>&1 ) =~ "release not found" ]]; then
echo "Creating release '${RELEASE_VERSION}'"
gh release create --repo "${REPOSITORY}" "${RELEASE_VERSION}"
gh release create --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}"
fi
cd artifacts
@ -31,7 +31,7 @@ for FILE in *
do
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
gh release upload --repo "${REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
gh release upload --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: ${EXIT_STATUS}"
@ -44,7 +44,7 @@ do
sleep $(( 15 * (i + 1)))
echo "RE-Uploading '${FILE}' at $( date "+%T" )"
gh release upload --repo "${REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
gh release upload --repo "${OWNER}/${REPOSITORY}" "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: ${EXIT_STATUS}"