From 8d01927a20efb515d18889ce281db32d479708ba Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Thu, 1 May 2025 02:08:27 +0200 Subject: [PATCH] fix: don't add extra `insider` to serverDownloadUrlTemplate (#2354) --- dev/build.sh | 2 ++ patches/add-remote-url.patch | 4 ++-- patches/insider/add-remote-url.patch | 18 ------------------ utils.sh | 2 ++ 4 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 patches/insider/add-remote-url.patch diff --git a/dev/build.sh b/dev/build.sh index c1bbaa9..c57741d 100755 --- a/dev/build.sh +++ b/dev/build.sh @@ -6,6 +6,7 @@ ### export APP_NAME="VSCodium" +export ASSETS_REPOSITORY="VSCodium/vscodium" export BINARY_NAME="codium" export CI_BUILD="no" export GH_REPO_PATH="VSCodium/vscodium" @@ -21,6 +22,7 @@ export VSCODE_SKIP_NODE_VERSION_CHECK="yes" while getopts ":ilops" opt; do case "$opt" in i) + export ASSETS_REPOSITORY="VSCodium/vscodium-insiders" export BINARY_NAME="codium-insiders" export VSCODE_QUALITY="insider" ;; diff --git a/patches/add-remote-url.patch b/patches/add-remote-url.patch index d5d33d6..9bf5306 100644 --- a/patches/add-remote-url.patch +++ b/patches/add-remote-url.patch @@ -5,7 +5,7 @@ index c1d64c0..3e60e80 100644 @@ -321,3 +321,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa const productJsonStream = gulp.src(['product.json'], { base: '.' }) - .pipe(json({ commit, date: readISODate('out-build'), version })) -+ .pipe(json({ commit, date: readISODate('out-build'), version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) ++ .pipe(json({ commit, date: readISODate('out-build'), version, serverDownloadUrlTemplate: 'https://github.com/!!ASSETS_REPOSITORY!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) .pipe(es.through(function (file) { diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 7046ee0..9aa7bb0 100644 @@ -14,5 +14,5 @@ index 7046ee0..9aa7bb0 100644 @@ -288,3 +288,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op const productJsonStream = gulp.src(['product.json'], { base: '.' }) - .pipe(json({ commit, date: readISODate('out-build'), checksums, version })) -+ .pipe(json({ commit, date: readISODate('out-build'), checksums, version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) ++ .pipe(json({ commit, date: readISODate('out-build'), checksums, version, serverDownloadUrlTemplate: 'https://github.com/!!ASSETS_REPOSITORY!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) .pipe(es.through(function (file) { diff --git a/patches/insider/add-remote-url.patch b/patches/insider/add-remote-url.patch deleted file mode 100644 index 8706443..0000000 --- a/patches/insider/add-remote-url.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js -index 2606eed..3e60e80 100644 ---- a/build/gulpfile.reh.js -+++ b/build/gulpfile.reh.js -@@ -321,3 +321,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa - const productJsonStream = gulp.src(['product.json'], { base: '.' }) -- .pipe(json({ commit, date: readISODate('out-build'), version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) -+ .pipe(json({ commit, date: readISODate('out-build'), version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!-insiders/releases/download/!!RELEASE_VERSION!!-insider/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!-insider.tar.gz' })) - .pipe(es.through(function (file) { -diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js -index b975c64..9aa7bb0 100644 ---- a/build/gulpfile.vscode.js -+++ b/build/gulpfile.vscode.js -@@ -288,3 +288,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op - const productJsonStream = gulp.src(['product.json'], { base: '.' }) -- .pipe(json({ commit, date: readISODate('out-build'), checksums, version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!/releases/download/!!RELEASE_VERSION!!/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!.tar.gz' })) -+ .pipe(json({ commit, date: readISODate('out-build'), checksums, version, serverDownloadUrlTemplate: 'https://github.com/!!GH_REPO_PATH!!-insiders/releases/download/!!RELEASE_VERSION!!-insider/!!APP_NAME_LC!!-reh-${os}-${arch}-!!RELEASE_VERSION!!-insider.tar.gz' })) - .pipe(es.through(function (file) { diff --git a/utils.sh b/utils.sh index 3ee2bf9..18996a1 100755 --- a/utils.sh +++ b/utils.sh @@ -2,6 +2,7 @@ APP_NAME="${APP_NAME:-VSCodium}" APP_NAME_LC="$( echo "${APP_NAME}" | awk '{print tolower($0)}' )" +ASSETS_REPOSITORY="${ASSETS_REPOSITORY:-VSCodium/vscodium}" BINARY_NAME="${BINARY_NAME:-codium}" GH_REPO_PATH="${GH_REPO_PATH:-VSCodium/vscodium}" ORG_NAME="${ORG_NAME:-VSCodium}" @@ -18,6 +19,7 @@ apply_patch() { replace "s|!!APP_NAME!!|${APP_NAME}|g" "$1" replace "s|!!APP_NAME_LC!!|${APP_NAME_LC}|g" "$1" + replace "s|!!ASSETS_REPOSITORY!!|${ASSETS_REPOSITORY}|g" "$1" replace "s|!!BINARY_NAME!!|${BINARY_NAME}|g" "$1" replace "s|!!GH_REPO_PATH!!|${GH_REPO_PATH}|g" "$1" replace "s|!!ORG_NAME!!|${ORG_NAME}|g" "$1"