refactor: reorganize files (#2185)

This commit is contained in:
Baptiste Augrain
2025-01-06 15:40:23 +01:00
committed by GitHub
parent 31f2fa2936
commit fef4a9aa03
32 changed files with 41 additions and 41 deletions

View File

@@ -232,7 +232,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_linux_bin.sh run: ./build/linux/package_bin.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Prepare assets - name: Prepare assets
@@ -362,7 +362,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_linux_reh.sh run: ./build/linux/package_reh.sh
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
- name: Release - name: Release
@@ -444,7 +444,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_alpine_reh.sh run: ./build/alpine/package_reh.sh
if: env.SHOULD_BUILD_REH != 'no' || github.event.inputs.generate_assets == 'true' if: env.SHOULD_BUILD_REH != 'no' || github.event.inputs.generate_assets == 'true'
- name: Release - name: Release

View File

@@ -56,8 +56,8 @@ jobs:
run: ./build.sh run: ./build.sh
if: env.SHOULD_BUILD == 'yes' if: env.SHOULD_BUILD == 'yes'
- name: Update <quality>.json - name: Update upstream version
run: ./update_qualityjson.sh run: ./update_upstream.sh
env: env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }} GITHUB_USERNAME: ${{ github.repository_owner }}

View File

@@ -214,7 +214,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.vscode_arch }} npm_config_arch: ${{ matrix.vscode_arch }}
npm_config_target_arch: ${{ matrix.vscode_arch }} npm_config_target_arch: ${{ matrix.vscode_arch }}
run: ./package_windows.sh run: ./build/windows/package.sh
if: env.SHOULD_BUILD == 'yes' if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets - name: Prepare assets

View File

@@ -231,7 +231,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_linux_bin.sh run: ./build/linux/package_bin.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Prepare assets - name: Prepare assets
@@ -361,7 +361,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_linux_reh.sh run: ./build/linux/package_reh.sh
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
- name: Release - name: Release
@@ -443,7 +443,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }} npm_config_arch: ${{ matrix.npm_arch }}
run: ./package_alpine_reh.sh run: ./build/alpine/package_reh.sh
if: env.SHOULD_BUILD_REH != 'no' || github.event.inputs.generate_assets == 'true' if: env.SHOULD_BUILD_REH != 'no' || github.event.inputs.generate_assets == 'true'
- name: Release - name: Release

View File

@@ -51,8 +51,8 @@ jobs:
run: ./build.sh run: ./build.sh
if: env.SHOULD_BUILD == 'yes' if: env.SHOULD_BUILD == 'yes'
- name: Update <quality>.json - name: Update upstream version
run: ./update_qualityjson.sh run: ./update_upstream.sh
env: env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }} GITHUB_USERNAME: ${{ github.repository_owner }}

View File

@@ -213,7 +213,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.vscode_arch }} npm_config_arch: ${{ matrix.vscode_arch }}
npm_config_target_arch: ${{ matrix.vscode_arch }} npm_config_target_arch: ${{ matrix.vscode_arch }}
run: ./package_windows.sh run: ./build/windows/package.sh
if: env.SHOULD_BUILD == 'yes' if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets - name: Prepare assets

View File

@@ -34,7 +34,7 @@ If you want to update the existing patches, please follow the section [`Patch Up
### Add a new patch ### Add a new patch
- first, you need to build VSCodium - first, you need to build VSCodium
- then use the command `patch.sh <your patch name>`, to initiate a new patch - then use the command `./dev/patch.sh <your patch name>`, to initiate a new patch
- when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium** - when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
- run `yarn watch` - run `yarn watch`
- run `./script/code.sh` - run `./script/code.sh`

View File

@@ -41,16 +41,16 @@ elif [[ "${VSCODE_ARCH}" == "loong64" ]]; then
export VSCODE_SKIP_SETUPENV=1 export VSCODE_SKIP_SETUPENV=1
fi fi
if [[ -f "../electron_linux_${VSCODE_ARCH}.sh" ]]; then if [[ -f "../build/linux/${VSCODE_ARCH}/electron.sh" ]]; then
# add newline at the end of the file # add newline at the end of the file
echo "" >> build/checksums/electron.txt echo "" >> build/checksums/electron.txt
if [[ -f "../electron_linux_${VSCODE_ARCH}.sha256sums" ]]; then if [[ -f "../build/linux/${VSCODE_ARCH}/electron.sha256sums" ]]; then
cat "../electron_linux_${VSCODE_ARCH}.sha256sums" >> build/checksums/electron.txt cat "../build/linux/${VSCODE_ARCH}/electron.sha256sums" >> build/checksums/electron.txt
fi fi
# shellcheck disable=SC1090 # shellcheck disable=SC1090
source "../electron_linux_${VSCODE_ARCH}.sh" source "../build/linux/${VSCODE_ARCH}/electron.sh"
if [[ "${ELECTRON_VERSION}" != "$( yarn config get target )" ]]; then if [[ "${ELECTRON_VERSION}" != "$( yarn config get target )" ]]; then
# Fail the pipeline if electron target doesn't match what is used. # Fail the pipeline if electron target doesn't match what is used.
@@ -124,8 +124,8 @@ node build/azure-pipelines/distro/mixin-npm
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci" yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then if [[ -f "../build/linux/${VSCODE_ARCH}/ripgrep.sh" ]]; then
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" "../VSCode-linux-${VSCODE_ARCH}/resources/app/node_modules" bash "../build/linux/${VSCODE_ARCH}/ripgrep.sh" "../VSCode-linux-${VSCODE_ARCH}/resources/app/node_modules"
fi fi
find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c

View File

@@ -3,4 +3,4 @@
# first so `bash` is the one installed with `git`, avoid conflict with WSL # first so `bash` is the one installed with `git`, avoid conflict with WSL
$env:Path = "C:\Program Files\Git\bin;" + $env:Path $env:Path = "C:\Program Files\Git\bin;" + $env:Path
bash ./build/build.sh bash ./dev/build.sh

View File

@@ -2,7 +2,7 @@
# shellcheck disable=SC1091,SC2129 # shellcheck disable=SC1091,SC2129
### Windows ### Windows
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh # to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./dev/build.sh
### ###
export APP_NAME="VSCodium" export APP_NAME="VSCodium"
@@ -124,7 +124,7 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
echo "{}" > ~/.gyp/include.gypi.pre-vscodium echo "{}" > ~/.gyp/include.gypi.pre-vscodium
fi fi
cp ./include_osx.gypi ~/.gyp/include.gypi cp ./build/osx/include.gypi ~/.gyp/include.gypi
fi fi
. build.sh . build.sh
@@ -134,8 +134,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
fi fi
if [[ "${VSCODE_LATEST}" == "yes" ]]; then if [[ "${VSCODE_LATEST}" == "yes" ]]; then
jsonTmp=$( cat "${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' ) jsonTmp=$( cat "./upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "${VSCODE_QUALITY}.json" && unset jsonTmp echo "${jsonTmp}" > "./upstream/${VSCODE_QUALITY}.json" && unset jsonTmp
fi fi
fi fi

View File

@@ -51,21 +51,21 @@ see [the common dependencies](#dependencies)
## <a id="build-scripts"></a>Build Scripts ## <a id="build-scripts"></a>Build Scripts
A build helper script can be found at `build/build.sh`. A build helper script can be found at `dev/build.sh`.
- Linux: `./build/build.sh` - Linux: `./dev/build.sh`
- MacOS: `./build/build.sh` - MacOS: `./dev/build.sh`
- Windows: `powershell -ExecutionPolicy ByPass -File .\build\build.ps1` or `"C:\Program Files\Git\bin\bash.exe" ./build/build.sh` - Windows: `powershell -ExecutionPolicy ByPass -File .\dev\build.ps1` or `"C:\Program Files\Git\bin\bash.exe" ./dev/build.sh`
### Insider ### Insider
The `insider` version can be built with `./build/build.sh -i` on the `insider` branch. The `insider` version can be built with `./dev/build.sh -i` on the `insider` branch.
You can try the latest version with the command `./build/build.sh -il` but the patches might not be up to date. You can try the latest version with the command `./dev/build.sh -il` but the patches might not be up to date.
### Flags ### Flags
The script `build/build.sh` provides several flags: The script `dev/build.sh` provides several flags:
- `-i`: build the Insiders version - `-i`: build the Insiders version
- `-l`: build with latest version of Visual Studio Code - `-l`: build with latest version of Visual Studio Code
@@ -93,8 +93,8 @@ review-tools.snap-review --allow-classic codium*.snap
## <a id="patch-update-process-semiauto"></a>Semi-Automated ## <a id="patch-update-process-semiauto"></a>Semi-Automated
- run `./build/build_<os>.sh`, if a patch is failing then, - run `./dev/build.sh`, if a patch is failing then,
- run `./build/update_patches.sh` - run `./dev/update_patches.sh`
- when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium** - when the script pauses at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
- fix all the `*.rej` files - fix all the `*.rej` files
- run `yarn watch` - run `yarn watch`
@@ -103,7 +103,7 @@ review-tools.snap-review --allow-classic codium*.snap
## <a id="patch-update-process-manual"></a>Manual ## <a id="patch-update-process-manual"></a>Manual
- run `./build/build_<os>.sh`, if a patch is failing then, - run `./dev/build.sh`, if a patch is failing then,
- open `vscode` directory in **VSCodium** - open `vscode` directory in **VSCodium**
- revert all changes - revert all changes
- run `git apply --reject ../patches/<name>.patch` - run `git apply --reject ../patches/<name>.patch`

View File

@@ -9,13 +9,13 @@ if [[ "${CI_BUILD}" != "no" ]]; then
fi fi
if [[ -z "${RELEASE_VERSION}" ]]; then if [[ -z "${RELEASE_VERSION}" ]]; then
if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "${VSCODE_QUALITY}.json" ]]; then if [[ "${VSCODE_LATEST}" == "yes" ]] || [[ ! -f "./upstream/${VSCODE_QUALITY}.json" ]]; then
echo "Retrieve lastest version" echo "Retrieve lastest version"
UPDATE_INFO=$( curl --silent --fail "https://update.code.visualstudio.com/api/update/darwin/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" ) UPDATE_INFO=$( curl --silent --fail "https://update.code.visualstudio.com/api/update/darwin/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" )
else else
echo "Get version from ${VSCODE_QUALITY}.json" echo "Get version from ${VSCODE_QUALITY}.json"
MS_COMMIT=$( jq -r '.commit' "${VSCODE_QUALITY}.json" ) MS_COMMIT=$( jq -r '.commit' "./upstream/${VSCODE_QUALITY}.json" )
MS_TAG=$( jq -r '.tag' "${VSCODE_QUALITY}.json" ) MS_TAG=$( jq -r '.tag' "./upstream/${VSCODE_QUALITY}.json" )
fi fi
if [[ -z "${MS_COMMIT}" ]]; then if [[ -z "${MS_COMMIT}" ]]; then
@@ -53,8 +53,8 @@ else
fi fi
fi fi
if [[ "${MS_TAG}" == "$( jq -r '.tag' "${VSCODE_QUALITY}".json )" ]]; then if [[ "${MS_TAG}" == "$( jq -r '.tag' "./upstream/${VSCODE_QUALITY}.json" )" ]]; then
MS_COMMIT=$( jq -r '.commit' "${VSCODE_QUALITY}".json ) MS_COMMIT=$( jq -r '.commit' "./upstream/${VSCODE_QUALITY}.json" )
else else
echo "Error: No MS_COMMIT for ${RELEASE_VERSION}" echo "Error: No MS_COMMIT for ${RELEASE_VERSION}"
exit 1 exit 1

View File

@@ -12,8 +12,8 @@ if [[ -z "${GH_TOKEN}" ]] && [[ -z "${GITHUB_TOKEN}" ]] && [[ -z "${GH_ENTERPRIS
exit 0 exit 0
fi fi
jsonTmp=$( cat "${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' ) jsonTmp=$( cat "./upstream/${VSCODE_QUALITY}.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "${VSCODE_QUALITY}.json" && unset jsonTmp echo "${jsonTmp}" > "./upstream/${VSCODE_QUALITY}.json" && unset jsonTmp
git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com" git config user.email "$( echo "${GITHUB_USERNAME}" | awk '{print tolower($0)}' )-ci@not-real.com"
git config user.name "${GITHUB_USERNAME} CI" git config user.name "${GITHUB_USERNAME} CI"