Skip to content

Commit

Permalink
cli: cleanup build
Browse files Browse the repository at this point in the history
- Remove the `prepare` script entirely
- Variables are now populated from the product.json during build. Most
  variables are mapped automatically, with some special handling in a
	few cases. `build.rs` is now much more self-contained.
- Look for the `product.overrides.json` for vscode developers instead of
  looking for a peer `vscode-distro` folder

Fixes #178691
  • Loading branch information
connor4312 committed Aug 9, 2023
1 parent 1094b5d commit b655e94
Show file tree
Hide file tree
Showing 14 changed files with 188 additions and 424 deletions.
7 changes: 0 additions & 7 deletions build/azure-pipelines/alpine/cli-build-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ steps:
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++" || echo "link exists"
displayName: Install musl build dependencies
- script: node build/azure-pipelines/cli/prepare.js
displayName: Prepare CLI build
env:
VSCODE_CLI_PREPARE_ROOT: $(Build.SourcesDirectory)/.build/distro
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
GITHUB_TOKEN: "$(github-distro-mixin-password)"

- template: ../cli/install-rust-posix.yml
parameters:
targets:
Expand Down
10 changes: 9 additions & 1 deletion build/azure-pipelines/cli/cli-compile-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$AppProductJson = Get-Content -Raw -Path "$(Build.SourcesDirectory)/product.json" | ConvertFrom-Json
$env:VSCODE_CLI_APPLICATION_NAME = $AppProductJson.tunnelApplicationName
Write-Host "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$env:VSCODE_CLI_APPLICATION_NAME"
Move-Item -Path $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code.exe -Destination "$(Build.ArtifactStagingDirectory)/${env:VSCODE_CLI_APPLICATION_NAME}.exe"
- task: ArchiveFiles@2
Expand All @@ -49,7 +54,10 @@ steps:
- ${{ else }}:
- script: |
set -e
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$(VSCODE_CLI_APPLICATION_NAME)
VSCODE_CLI_APPLICATION_NAME=$(node -p "require(\"$(Build.SourcesDirectory)/product.json\").applicationName")
echo "##vso[task.setvariable variable=VSCODE_CLI_APPLICATION_NAME]$VSCODE_CLI_APPLICATION_NAME"
mv $(Build.SourcesDirectory)/cli/target/${{ parameters.VSCODE_CLI_TARGET }}/release/code $(Build.ArtifactStagingDirectory)/$VSCODE_CLI_APPLICATION_NAME
- ${{ if contains(parameters.VSCODE_CLI_TARGET, '-darwin') }}:
- task: ArchiveFiles@2
Expand Down
93 changes: 0 additions & 93 deletions build/azure-pipelines/cli/prepare.js

This file was deleted.

99 changes: 0 additions & 99 deletions build/azure-pipelines/cli/prepare.ts

This file was deleted.

7 changes: 0 additions & 7 deletions build/azure-pipelines/darwin/cli-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ steps:
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
displayName: Extract openssl prebuilt
- script: node build/azure-pipelines/cli/prepare.js
displayName: Prepare CLI build
env:
VSCODE_CLI_PREPARE_ROOT: $(Build.SourcesDirectory)/.build/distro
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
GITHUB_TOKEN: "$(github-distro-mixin-password)"

- template: ../cli/install-rust-posix.yml
parameters:
targets:
Expand Down
7 changes: 0 additions & 7 deletions build/azure-pipelines/linux/cli-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ steps:
- bash: sudo apt-get install -yq gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
displayName: Install arm64 toolchains

- script: node build/azure-pipelines/cli/prepare.js
displayName: Prepare CLI build
env:
VSCODE_CLI_PREPARE_ROOT: $(Build.SourcesDirectory)/.build/distro
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
GITHUB_TOKEN: "$(github-distro-mixin-password)"

- template: ../cli/install-rust-posix.yml
parameters:
targets:
Expand Down
7 changes: 0 additions & 7 deletions build/azure-pipelines/win32/cli-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ steps:
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
displayName: Extract openssl prebuilt
- powershell: node build/azure-pipelines/cli/prepare.js
displayName: Prepare CLI build
env:
VSCODE_CLI_PREPARE_ROOT: $(Build.SourcesDirectory)/.build/distro
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
GITHUB_TOKEN: "$(github-distro-mixin-password)"

- template: ../cli/install-rust-win32.yml
parameters:
targets:
Expand Down
Loading

0 comments on commit b655e94

Please sign in to comment.