fix: replace publisher's name (#1246)

This commit is contained in:
Baptiste Augrain 2022-09-11 13:08:41 +02:00 committed by GitHub
parent b90af6eda5
commit 3664544e77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 7 deletions

View file

@ -10,13 +10,13 @@ fi
if [[ -z "${RELEASE_VERSION}" ]]; then
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "insider.json" ]]; then
UPDATE_INFO=$( curl https://update.code.visualstudio.com/api/update/darwin/insider/lol )
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/insider/lol )
else
export MS_COMMIT=$(jq -r '.commit' insider.json)
export MS_TAG=$(jq -r '.tag' insider.json)
fi
else
UPDATE_INFO=$( curl https://update.code.visualstudio.com/api/update/darwin/stable/lol )
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/stable/lol )
fi
if [[ -z "${MS_COMMIT}" ]]; then
@ -73,9 +73,9 @@ git remote add origin https://github.com/Microsoft/vscode.git
# figure out latest tag by calling MS update API
if [[ -z "${MS_TAG}" ]]; then
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
UPDATE_INFO=$( curl https://update.code.visualstudio.com/api/update/darwin/insider/lol )
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/insider/lol )
else
UPDATE_INFO=$( curl https://update.code.visualstudio.com/api/update/darwin/stable/lol )
UPDATE_INFO=$( curl --silent https://update.code.visualstudio.com/api/update/darwin/stable/lol )
fi
export MS_COMMIT=$( echo "${UPDATE_INFO}" | jq -r '.version' )
export MS_TAG=$( echo "${UPDATE_INFO}" | jq -r '.name' )

View file

@ -71,8 +71,6 @@ else
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
fi
cp product.json product.json.bak
setpath() {
{ set +x; } 2>/dev/null
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
@ -85,7 +83,9 @@ setpath_json() {
set -x
}
# set fields in product.json
# product.json
cp product.json product.json.bak
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
setpath_json "product" "extensionsGallery" '{"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item"}'
@ -153,12 +153,21 @@ echo "$( jq -s '.[0] * .[1]' product.json ../product.json )" > product.json
cat product.json
# package.json
cp package.json 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" )
replace 's|Microsoft Corporation|VSCodium|' package.json
../undo_telemetry.sh
replace 's|Microsoft Corporation|VSCodium|' build/lib/electron.js
replace 's|Microsoft Corporation|VSCodium|' build/lib/electron.ts
replace 's|([0-9]) Microsoft|\1 VSCodium|' build/lib/electron.js
replace 's|([0-9]) Microsoft|\1 VSCodium|' build/lib/electron.ts
if [[ "${OS_NAME}" == "linux" ]]; then
# microsoft adds their apt repo to sources
# unless the app name is code-oss
@ -192,6 +201,10 @@ if [[ "${OS_NAME}" == "linux" ]]; then
# snapcraft.yaml
sed -i 's|Visual Studio Code|VSCodium|' resources/linux/rpm/code.spec.template
elif [[ "${OS_NAME}" == "windows" ]]; then
# code.iss
sed -i 's|https://code.visualstudio.com|https://vscodium.com|' build/win32/code.iss
sed -i 's|Microsoft Corporation|VSCodium|' build/win32/code.iss
fi
cd ..

View file

@ -0,0 +1,9 @@
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
BackgroundColor="#2D2D30"
ShowNameOnSquare150x150Logo="on"
Square150x150Logo="resources\app\resources\win32\code_150x150.png"
Square70x70Logo="resources\app\resources\win32\code_70x70.png"
ForegroundText="light"
ShortDisplayName="VSCodium - Insiders" />
</Application>

View file

@ -0,0 +1,9 @@
<Application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
BackgroundColor="#2D2D30"
ShowNameOnSquare150x150Logo="on"
Square150x150Logo="resources\app\resources\win32\code_150x150.png"
Square70x70Logo="resources\app\resources\win32\code_70x70.png"
ForegroundText="light"
ShortDisplayName="VSCodium" />
</Application>