mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
parent
221637ea82
commit
9c71a7f43c
5 changed files with 68 additions and 191 deletions
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
|
|
@ -789,7 +789,7 @@ jobs:
|
||||||
|
|
||||||
bundle-windows-x64:
|
bundle-windows-x64:
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
name: Create a Windows installer for x86_64
|
name: Create a Windows installer
|
||||||
runs-on: [self-32vcpu-windows-2022]
|
runs-on: [self-32vcpu-windows-2022]
|
||||||
if: |
|
if: |
|
||||||
( startsWith(github.ref, 'refs/tags/v')
|
( startsWith(github.ref, 'refs/tags/v')
|
||||||
|
|
@ -844,70 +844,13 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
bundle-windows-aarch64:
|
|
||||||
timeout-minutes: 120
|
|
||||||
name: Create a Windows installer for aarch64
|
|
||||||
runs-on: [self-32vcpu-windows-2022]
|
|
||||||
if: |
|
|
||||||
( startsWith(github.ref, 'refs/tags/v')
|
|
||||||
|| contains(github.event.pull_request.labels.*.name, 'run-bundling') )
|
|
||||||
needs: [windows_tests]
|
|
||||||
env:
|
|
||||||
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
|
|
||||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
|
|
||||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
|
|
||||||
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
|
|
||||||
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
|
|
||||||
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
|
|
||||||
FILE_DIGEST: SHA256
|
|
||||||
TIMESTAMP_DIGEST: SHA256
|
|
||||||
TIMESTAMP_SERVER: "http://timestamp.acs.microsoft.com"
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
||||||
with:
|
|
||||||
clean: false
|
|
||||||
|
|
||||||
- name: Setup Sentry CLI
|
|
||||||
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
|
|
||||||
with:
|
|
||||||
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Determine version and release channel
|
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
||||||
run: |
|
|
||||||
# This exports RELEASE_CHANNEL into env (GITHUB_ENV)
|
|
||||||
script/determine-release-channel.ps1
|
|
||||||
|
|
||||||
- name: Build Zed installer
|
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
|
||||||
run: script/bundle-windows.ps1 -Architecture aarch64
|
|
||||||
|
|
||||||
- name: Upload installer (aarch64) to Workflow - zed (run-bundling)
|
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'run-bundling')
|
|
||||||
with:
|
|
||||||
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.exe
|
|
||||||
path: ${{ env.SETUP_PATH }}
|
|
||||||
|
|
||||||
- name: Upload Artifacts to release
|
|
||||||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
|
||||||
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'run-bundling')) }}
|
|
||||||
with:
|
|
||||||
draft: true
|
|
||||||
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
|
|
||||||
files: ${{ env.SETUP_PATH }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
auto-release-preview:
|
auto-release-preview:
|
||||||
name: Auto release preview
|
name: Auto release preview
|
||||||
if: |
|
if: |
|
||||||
false
|
false
|
||||||
&& startsWith(github.ref, 'refs/tags/v')
|
&& startsWith(github.ref, 'refs/tags/v')
|
||||||
&& endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
|
&& endsWith(github.ref, '-pre') && !endsWith(github.ref, '.0-pre')
|
||||||
needs: [bundle-mac, bundle-linux-x86_x64, bundle-linux-aarch64, bundle-windows-x64, bundle-windows-aarch64]
|
needs: [bundle-mac, bundle-linux-x86_x64, bundle-linux-aarch64, bundle-windows-x64]
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-mini-macos
|
- self-mini-macos
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
50
.github/workflows/release_nightly.yml
vendored
50
.github/workflows/release_nightly.yml
vendored
|
|
@ -246,7 +246,7 @@ jobs:
|
||||||
|
|
||||||
bundle-windows-x64:
|
bundle-windows-x64:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
name: Create a Windows installer for x86_64
|
name: Create a Windows installer
|
||||||
if: github.repository_owner == 'zed-industries'
|
if: github.repository_owner == 'zed-industries'
|
||||||
runs-on: [self-32vcpu-windows-2022]
|
runs-on: [self-32vcpu-windows-2022]
|
||||||
needs: windows-tests
|
needs: windows-tests
|
||||||
|
|
@ -281,54 +281,11 @@ jobs:
|
||||||
|
|
||||||
- name: Build Zed installer
|
- name: Build Zed installer
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
run: script/bundle-windows.ps1 -Architecture x86_64
|
run: script/bundle-windows.ps1
|
||||||
|
|
||||||
- name: Upload Zed Nightly
|
- name: Upload Zed Nightly
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
working-directory: ${{ env.ZED_WORKSPACE }}
|
||||||
run: script/upload-nightly.ps1 -Architecture x86_64
|
run: script/upload-nightly.ps1 windows
|
||||||
|
|
||||||
bundle-windows-arm64:
|
|
||||||
timeout-minutes: 60
|
|
||||||
name: Create a Windows installer for aarch64
|
|
||||||
if: github.repository_owner == 'zed-industries'
|
|
||||||
runs-on: [self-32vcpu-windows-2022]
|
|
||||||
needs: windows-tests
|
|
||||||
env:
|
|
||||||
AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
|
|
||||||
AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
|
|
||||||
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
|
|
||||||
ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
|
|
||||||
CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
|
|
||||||
ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
|
|
||||||
FILE_DIGEST: SHA256
|
|
||||||
TIMESTAMP_DIGEST: SHA256
|
|
||||||
TIMESTAMP_SERVER: "http://timestamp.acs.microsoft.com"
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
||||||
with:
|
|
||||||
clean: false
|
|
||||||
|
|
||||||
- name: Set release channel to nightly
|
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
|
||||||
run: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$version = git rev-parse --short HEAD
|
|
||||||
Write-Host "Publishing version: $version on release channel nightly"
|
|
||||||
"nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
|
|
||||||
|
|
||||||
- name: Setup Sentry CLI
|
|
||||||
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
|
|
||||||
with:
|
|
||||||
token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build Zed installer
|
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
|
||||||
run: script/bundle-windows.ps1 -Architecture aarch64
|
|
||||||
|
|
||||||
- name: Upload Zed Nightly
|
|
||||||
working-directory: ${{ env.ZED_WORKSPACE }}
|
|
||||||
run: script/upload-nightly.ps1 -Architecture aarch64
|
|
||||||
|
|
||||||
update-nightly-tag:
|
update-nightly-tag:
|
||||||
name: Update nightly tag
|
name: Update nightly tag
|
||||||
|
|
@ -339,7 +296,6 @@ jobs:
|
||||||
- bundle-linux-x86
|
- bundle-linux-x86
|
||||||
- bundle-linux-arm
|
- bundle-linux-arm
|
||||||
- bundle-windows-x64
|
- bundle-windows-x64
|
||||||
- bundle-windows-arm64
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,7 @@ WizardStyle=modern
|
||||||
|
|
||||||
CloseApplications=force
|
CloseApplications=force
|
||||||
|
|
||||||
#ifdef Defaultsign
|
|
||||||
SignTool=Defaultsign
|
SignTool=Defaultsign
|
||||||
#endif
|
|
||||||
|
|
||||||
DefaultDirName={autopf}\{#AppName}
|
DefaultDirName={autopf}\{#AppName}
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
Param(
|
Param(
|
||||||
[Parameter()][Alias('i')][switch]$Install,
|
[Parameter()][Alias('i')][switch]$Install,
|
||||||
[Parameter()][Alias('h')][switch]$Help,
|
[Parameter()][Alias('h')][switch]$Help,
|
||||||
[Parameter()][Alias('a')][string]$Architecture,
|
|
||||||
[Parameter()][string]$Name
|
[Parameter()][string]$Name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -15,44 +14,12 @@ $PSNativeCommandUseErrorActionPreference = $true
|
||||||
|
|
||||||
$buildSuccess = $false
|
$buildSuccess = $false
|
||||||
|
|
||||||
$OSArchitecture = switch ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture) {
|
|
||||||
"X64" { "x86_64" }
|
|
||||||
"Arm64" { "aarch64" }
|
|
||||||
default { throw "Unsupported architecture" }
|
|
||||||
}
|
|
||||||
|
|
||||||
$Architecture = if ($Architecture) {
|
|
||||||
$Architecture
|
|
||||||
} else {
|
|
||||||
$OSArchitecture
|
|
||||||
}
|
|
||||||
|
|
||||||
$CargoOutDir = "./target/$Architecture-pc-windows-msvc/release"
|
|
||||||
|
|
||||||
function Get-VSArch {
|
|
||||||
param(
|
|
||||||
[string]$Arch
|
|
||||||
)
|
|
||||||
|
|
||||||
switch ($Arch) {
|
|
||||||
"x86_64" { "amd64" }
|
|
||||||
"aarch64" { "arm64" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Push-Location
|
|
||||||
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -Arch (Get-VSArch -Arch $Architecture) -HostArch (Get-VSArch -Arch $OSArchitecture)
|
|
||||||
Pop-Location
|
|
||||||
|
|
||||||
$target = "$Architecture-pc-windows-msvc"
|
|
||||||
|
|
||||||
if ($Help) {
|
if ($Help) {
|
||||||
Write-Output "Usage: test.ps1 [-Install] [-Help]"
|
Write-Output "Usage: test.ps1 [-Install] [-Help]"
|
||||||
Write-Output "Build the installer for Windows.\n"
|
Write-Output "Build the installer for Windows.\n"
|
||||||
Write-Output "Options:"
|
Write-Output "Options:"
|
||||||
Write-Output " -Architecture, -a Which architecture to build (x86_64 or aarch64)"
|
Write-Output " -Install, -i Run the installer after building."
|
||||||
Write-Output " -Install, -i Run the installer after building."
|
Write-Output " -Help, -h Show this help message."
|
||||||
Write-Output " -Help, -h Show this help message."
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -63,10 +30,6 @@ $env:RELEASE_CHANNEL = $channel
|
||||||
Pop-Location
|
Pop-Location
|
||||||
|
|
||||||
function CheckEnvironmentVariables {
|
function CheckEnvironmentVariables {
|
||||||
if(-not $env:CI) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
$requiredVars = @(
|
$requiredVars = @(
|
||||||
'ZED_WORKSPACE', 'RELEASE_VERSION', 'ZED_RELEASE_CHANNEL',
|
'ZED_WORKSPACE', 'RELEASE_VERSION', 'ZED_RELEASE_CHANNEL',
|
||||||
'AZURE_TENANT_ID', 'AZURE_CLIENT_ID', 'AZURE_CLIENT_SECRET',
|
'AZURE_TENANT_ID', 'AZURE_CLIENT_ID', 'AZURE_CLIENT_SECRET',
|
||||||
|
|
@ -92,8 +55,6 @@ function PrepareForBundle {
|
||||||
New-Item -Path "$innoDir\appx" -ItemType Directory -Force
|
New-Item -Path "$innoDir\appx" -ItemType Directory -Force
|
||||||
New-Item -Path "$innoDir\bin" -ItemType Directory -Force
|
New-Item -Path "$innoDir\bin" -ItemType Directory -Force
|
||||||
New-Item -Path "$innoDir\tools" -ItemType Directory -Force
|
New-Item -Path "$innoDir\tools" -ItemType Directory -Force
|
||||||
|
|
||||||
rustup target add $target
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function GenerateLicenses {
|
function GenerateLicenses {
|
||||||
|
|
@ -106,34 +67,34 @@ function GenerateLicenses {
|
||||||
function BuildZedAndItsFriends {
|
function BuildZedAndItsFriends {
|
||||||
Write-Output "Building Zed and its friends, for channel: $channel"
|
Write-Output "Building Zed and its friends, for channel: $channel"
|
||||||
# Build zed.exe, cli.exe and auto_update_helper.exe
|
# Build zed.exe, cli.exe and auto_update_helper.exe
|
||||||
cargo build --release --package zed --package cli --package auto_update_helper --target $target
|
cargo build --release --package zed --package cli --package auto_update_helper
|
||||||
Copy-Item -Path ".\$CargoOutDir\zed.exe" -Destination "$innoDir\Zed.exe" -Force
|
Copy-Item -Path ".\target\release\zed.exe" -Destination "$innoDir\Zed.exe" -Force
|
||||||
Copy-Item -Path ".\$CargoOutDir\cli.exe" -Destination "$innoDir\cli.exe" -Force
|
Copy-Item -Path ".\target\release\cli.exe" -Destination "$innoDir\cli.exe" -Force
|
||||||
Copy-Item -Path ".\$CargoOutDir\auto_update_helper.exe" -Destination "$innoDir\auto_update_helper.exe" -Force
|
Copy-Item -Path ".\target\release\auto_update_helper.exe" -Destination "$innoDir\auto_update_helper.exe" -Force
|
||||||
# Build explorer_command_injector.dll
|
# Build explorer_command_injector.dll
|
||||||
switch ($channel) {
|
switch ($channel) {
|
||||||
"stable" {
|
"stable" {
|
||||||
cargo build --release --features stable --no-default-features --package explorer_command_injector --target $target
|
cargo build --release --features stable --no-default-features --package explorer_command_injector
|
||||||
}
|
}
|
||||||
"preview" {
|
"preview" {
|
||||||
cargo build --release --features preview --no-default-features --package explorer_command_injector --target $target
|
cargo build --release --features preview --no-default-features --package explorer_command_injector
|
||||||
}
|
}
|
||||||
default {
|
default {
|
||||||
cargo build --release --package explorer_command_injector --target $target
|
cargo build --release --package explorer_command_injector
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Copy-Item -Path ".\$CargoOutDir\explorer_command_injector.dll" -Destination "$innoDir\zed_explorer_command_injector.dll" -Force
|
Copy-Item -Path ".\target\release\explorer_command_injector.dll" -Destination "$innoDir\zed_explorer_command_injector.dll" -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
function ZipZedAndItsFriendsDebug {
|
function ZipZedAndItsFriendsDebug {
|
||||||
$items = @(
|
$items = @(
|
||||||
".\$CargoOutDir\zed.pdb",
|
".\target\release\zed.pdb",
|
||||||
".\$CargoOutDir\cli.pdb",
|
".\target\release\cli.pdb",
|
||||||
".\$CargoOutDir\auto_update_helper.pdb",
|
".\target\release\auto_update_helper.pdb",
|
||||||
".\$CargoOutDir\explorer_command_injector.pdb"
|
".\target\release\explorer_command_injector.pdb"
|
||||||
)
|
)
|
||||||
|
|
||||||
Compress-Archive -Path $items -DestinationPath ".\$CargoOutDir\zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip" -Force
|
Compress-Archive -Path $items -DestinationPath ".\target\release\zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip" -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -148,7 +109,7 @@ function UploadToSentry {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Write-Output "Uploading zed debug symbols to sentry..."
|
Write-Output "Uploading zed debug symbols to sentry..."
|
||||||
sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev $CargoOutDir
|
sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev .\target\release\
|
||||||
}
|
}
|
||||||
|
|
||||||
function MakeAppx {
|
function MakeAppx {
|
||||||
|
|
@ -171,10 +132,6 @@ function MakeAppx {
|
||||||
}
|
}
|
||||||
|
|
||||||
function SignZedAndItsFriends {
|
function SignZedAndItsFriends {
|
||||||
if (-not $env:CI) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
$files = "$innoDir\Zed.exe,$innoDir\cli.exe,$innoDir\auto_update_helper.exe,$innoDir\zed_explorer_command_injector.dll,$innoDir\zed_explorer_command_injector.appx"
|
$files = "$innoDir\Zed.exe,$innoDir\cli.exe,$innoDir\auto_update_helper.exe,$innoDir\zed_explorer_command_injector.dll,$innoDir\zed_explorer_command_injector.appx"
|
||||||
& "$innoDir\sign.ps1" $files
|
& "$innoDir\sign.ps1" $files
|
||||||
}
|
}
|
||||||
|
|
@ -215,7 +172,7 @@ function BuildInstaller {
|
||||||
$appIconName = "app-icon"
|
$appIconName = "app-icon"
|
||||||
$appName = "Zed"
|
$appName = "Zed"
|
||||||
$appDisplayName = "Zed"
|
$appDisplayName = "Zed"
|
||||||
$appSetupName = "Zed-$Architecture"
|
$appSetupName = "Zed-x86_64"
|
||||||
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
||||||
$appMutex = "Zed-Stable-Instance-Mutex"
|
$appMutex = "Zed-Stable-Instance-Mutex"
|
||||||
$appExeName = "Zed"
|
$appExeName = "Zed"
|
||||||
|
|
@ -229,7 +186,7 @@ function BuildInstaller {
|
||||||
$appIconName = "app-icon-preview"
|
$appIconName = "app-icon-preview"
|
||||||
$appName = "Zed Preview"
|
$appName = "Zed Preview"
|
||||||
$appDisplayName = "Zed Preview"
|
$appDisplayName = "Zed Preview"
|
||||||
$appSetupName = "Zed-$Architecture"
|
$appSetupName = "Zed-x86_64"
|
||||||
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
||||||
$appMutex = "Zed-Preview-Instance-Mutex"
|
$appMutex = "Zed-Preview-Instance-Mutex"
|
||||||
$appExeName = "Zed"
|
$appExeName = "Zed"
|
||||||
|
|
@ -243,7 +200,7 @@ function BuildInstaller {
|
||||||
$appIconName = "app-icon-nightly"
|
$appIconName = "app-icon-nightly"
|
||||||
$appName = "Zed Nightly"
|
$appName = "Zed Nightly"
|
||||||
$appDisplayName = "Zed Nightly"
|
$appDisplayName = "Zed Nightly"
|
||||||
$appSetupName = "Zed-$Architecture"
|
$appSetupName = "Zed-x86_64"
|
||||||
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
||||||
$appMutex = "Zed-Nightly-Instance-Mutex"
|
$appMutex = "Zed-Nightly-Instance-Mutex"
|
||||||
$appExeName = "Zed"
|
$appExeName = "Zed"
|
||||||
|
|
@ -257,7 +214,7 @@ function BuildInstaller {
|
||||||
$appIconName = "app-icon-dev"
|
$appIconName = "app-icon-dev"
|
||||||
$appName = "Zed Dev"
|
$appName = "Zed Dev"
|
||||||
$appDisplayName = "Zed Dev"
|
$appDisplayName = "Zed Dev"
|
||||||
$appSetupName = "Zed-$Architecture"
|
$appSetupName = "Zed-x86_64"
|
||||||
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
# The mutex name here should match the mutex name in crates\zed\src\zed\windows_only_instance.rs
|
||||||
$appMutex = "Zed-Dev-Instance-Mutex"
|
$appMutex = "Zed-Dev-Instance-Mutex"
|
||||||
$appExeName = "Zed"
|
$appExeName = "Zed"
|
||||||
|
|
@ -295,16 +252,14 @@ function BuildInstaller {
|
||||||
"AppxFullName" = $appAppxFullName
|
"AppxFullName" = $appAppxFullName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$signTool = "powershell.exe -ExecutionPolicy Bypass -File $innoDir\sign.ps1 `$f"
|
||||||
|
|
||||||
$defs = @()
|
$defs = @()
|
||||||
foreach ($key in $definitions.Keys) {
|
foreach ($key in $definitions.Keys) {
|
||||||
$defs += "/d$key=`"$($definitions[$key])`""
|
$defs += "/d$key=`"$($definitions[$key])`""
|
||||||
}
|
}
|
||||||
|
|
||||||
$innoArgs = @($issFilePath) + $defs
|
$innoArgs = @($issFilePath) + $defs + "/sDefaultsign=`"$signTool`""
|
||||||
if($env:CI) {
|
|
||||||
$signTool = "powershell.exe -ExecutionPolicy Bypass -File $innoDir\sign.ps1 `$f"
|
|
||||||
$innoArgs += "/sDefaultsign=`"$signTool`""
|
|
||||||
}
|
|
||||||
|
|
||||||
# Execute Inno Setup
|
# Execute Inno Setup
|
||||||
Write-Host "🚀 Running Inno Setup: $innoSetupPath $innoArgs"
|
Write-Host "🚀 Running Inno Setup: $innoSetupPath $innoArgs"
|
||||||
|
|
@ -323,7 +278,7 @@ function BuildInstaller {
|
||||||
|
|
||||||
ParseZedWorkspace
|
ParseZedWorkspace
|
||||||
$innoDir = "$env:ZED_WORKSPACE\inno"
|
$innoDir = "$env:ZED_WORKSPACE\inno"
|
||||||
$debugArchive = "$CargoOutDir\zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip"
|
$debugArchive = ".\target\release\zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip"
|
||||||
$debugStoreKey = "$env:ZED_RELEASE_CHANNEL/zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip"
|
$debugStoreKey = "$env:ZED_RELEASE_CHANNEL/zed-$env:RELEASE_VERSION-$env:ZED_RELEASE_CHANNEL.dbg.zip"
|
||||||
|
|
||||||
CheckEnvironmentVariables
|
CheckEnvironmentVariables
|
||||||
|
|
@ -338,10 +293,8 @@ DownloadConpty
|
||||||
CollectFiles
|
CollectFiles
|
||||||
BuildInstaller
|
BuildInstaller
|
||||||
|
|
||||||
if($env:CI) {
|
UploadToBlobStorePublic -BucketName "zed-debug-symbols" -FileToUpload $debugArchive -BlobStoreKey $debugStoreKey
|
||||||
UploadToBlobStorePublic -BucketName "zed-debug-symbols" -FileToUpload $debugArchive -BlobStoreKey $debugStoreKey
|
UploadToSentry
|
||||||
UploadToSentry
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($buildSuccess) {
|
if ($buildSuccess) {
|
||||||
Write-Output "Build successful"
|
Write-Output "Build successful"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,32 @@
|
||||||
[CmdletBinding()]
|
|
||||||
Param(
|
|
||||||
[Parameter()][string]$Architecture
|
|
||||||
)
|
|
||||||
|
|
||||||
# Based on the template in: https://docs.digitalocean.com/reference/api/spaces-api/
|
# Based on the template in: https://docs.digitalocean.com/reference/api/spaces-api/
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
. "$PSScriptRoot\lib\blob-store.ps1"
|
. "$PSScriptRoot\lib\blob-store.ps1"
|
||||||
. "$PSScriptRoot\lib\workspace.ps1"
|
. "$PSScriptRoot\lib\workspace.ps1"
|
||||||
|
|
||||||
|
$allowedTargets = @("windows")
|
||||||
|
|
||||||
|
function Test-AllowedTarget {
|
||||||
|
param (
|
||||||
|
[string]$Target
|
||||||
|
)
|
||||||
|
|
||||||
|
return $allowedTargets -contains $Target
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process arguments
|
||||||
|
if ($args.Count -gt 0) {
|
||||||
|
$target = $args[0]
|
||||||
|
if (Test-AllowedTarget $target) {
|
||||||
|
# Valid target
|
||||||
|
} else {
|
||||||
|
Write-Error "Error: Target '$target' is not allowed.`nUsage: $($MyInvocation.MyCommand.Name) [$($allowedTargets -join ', ')]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Error "Error: Target is not specified.`nUsage: $($MyInvocation.MyCommand.Name) [$($allowedTargets -join ', ')]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
ParseZedWorkspace
|
ParseZedWorkspace
|
||||||
Write-Host "Uploading nightly for target: $target"
|
Write-Host "Uploading nightly for target: $target"
|
||||||
|
|
||||||
|
|
@ -25,8 +44,17 @@ $sha | Out-File -FilePath "target/latest-sha" -NoNewline
|
||||||
# Remove-Item -Path $file.FullName
|
# Remove-Item -Path $file.FullName
|
||||||
# }
|
# }
|
||||||
|
|
||||||
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "nightly/Zed-$Architecture.exe"
|
switch ($target) {
|
||||||
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows"
|
"windows" {
|
||||||
|
UploadToBlobStore -BucketName $bucketName -FileToUpload $env:SETUP_PATH -BlobStoreKey "nightly/Zed-x86_64.exe"
|
||||||
|
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows"
|
||||||
|
|
||||||
Remove-Item -Path "target/Zed-$Architecture.exe" -ErrorAction SilentlyContinue
|
Remove-Item -Path $env:SETUP_PATH -ErrorAction SilentlyContinue
|
||||||
Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue
|
Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
|
||||||
|
default {
|
||||||
|
Write-Error "Error: Unknown target '$target'"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue