mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
using AGENT_OS directly
This commit is contained in:
parent
9a3112cb9d
commit
b0aa6c678c
@ -1,6 +1,6 @@
|
||||
steps:
|
||||
- pwsh: |
|
||||
if (($env:OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
node 'script\vsts\windows-run.js' 'script\bootstrap.cmd'
|
||||
}
|
||||
else {
|
||||
@ -9,7 +9,6 @@ steps:
|
||||
displayName: Bootstrap build environment
|
||||
env:
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
OS: $(Agent.OS)
|
||||
CI: true
|
||||
CI_PROVIDER: VSTS
|
||||
${{ if eq(variables['Agent.OS'], 'Windows_NT') }}:
|
||||
|
@ -1,6 +1,6 @@
|
||||
steps:
|
||||
- pwsh: |
|
||||
if ($env:OS -eq "Windows_NT") {
|
||||
if ($env:AGENT_OS -eq "Windows_NT") {
|
||||
mkdir -f -p $env:SQUIRREL_TEMP
|
||||
if ($env:IS_RELEASE_BRANCH -eq "true") {
|
||||
$CreateWindowsInstallaer="--create-windows-installer"
|
||||
@ -13,14 +13,13 @@ steps:
|
||||
} else {
|
||||
$CodeSign=""
|
||||
}
|
||||
if (($env:OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
node 'script\vsts\windows-run.js' 'script\build.cmd' --no-bootstrap --compress-artifacts $env:args $CodeSign $CreateWindowsInstallaer
|
||||
} else {
|
||||
script/build --no-bootstrap --compress-artifacts $env:args $CodeSign $CreateWindowsInstallaer
|
||||
}
|
||||
displayName: Build Atom
|
||||
env:
|
||||
OS: $(Agent.OS)
|
||||
GITHUB_TOKEN: $(GITHUB_TOKEN)
|
||||
IS_RELEASE_BRANCH: $(IsReleaseBranch)
|
||||
IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch)
|
||||
|
@ -1,15 +1,14 @@
|
||||
steps:
|
||||
- pwsh: |
|
||||
if ($env:OS -eq "Darwin") {
|
||||
if ($env:AGENT_OS -eq "Darwin") {
|
||||
osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver
|
||||
caffeinate -s script/test # Run with caffeinate to prevent screen saver
|
||||
} elseif (($env:OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
} elseif (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
node 'script\vsts\windows-run.js' 'script\test.cmd'
|
||||
} else {
|
||||
script/test
|
||||
}
|
||||
env:
|
||||
OS: $(Agent.OS)
|
||||
${{ if eq(variables['Agent.OS'], 'Windows_NT') }}:
|
||||
BUILD_ARCH: $(buildArch)
|
||||
${{ if eq(variables['Agent.OS'], 'Linux') }}:
|
||||
@ -25,13 +24,12 @@ steps:
|
||||
|
||||
# Test results
|
||||
- pwsh: |
|
||||
if (($env:OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
|
||||
node 'script\vsts\windows-run.js' 'script\postprocess-junit-results.cmd' --search-folder "$env:TEST_JUNIT_XML_ROOT" --test-results-files "**/*.xml"
|
||||
} else {
|
||||
script/postprocess-junit-results --search-folder "$env:TEST_JUNIT_XML_ROOT" --test-results-files "**/*.xml"
|
||||
}
|
||||
env:
|
||||
OS: $(Agent.OS)
|
||||
${{ if eq(variables['Agent.OS'], 'Windows_NT') }}:
|
||||
BUILD_ARCH: $(buildArch)
|
||||
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)/junit
|
||||
@ -51,13 +49,12 @@ steps:
|
||||
# Crash Reports
|
||||
- pwsh: |
|
||||
mkdir -f -p $env:ARTIFACT_STAGING_DIR/crash-reports
|
||||
if (($env:OS -eq "Windows_NT") -and (Test-Path "$env:TEMP/Atom Crashes")) {
|
||||
if (($env:AGENT_OS -eq "Windows_NT") -and (Test-Path "$env:TEMP/Atom Crashes")) {
|
||||
cp "$env:TEMP/Atom Crashes/*.dmp" $env:ARTIFACT_STAGING_DIR/crash-reports
|
||||
} else {
|
||||
cp $env:HOME/Library/Logs/DiagnosticReports/*.crash $env:ARTIFACT_STAGING_DIR/crash-reports
|
||||
}
|
||||
env:
|
||||
OS: $(Agent.OS)
|
||||
ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory)
|
||||
displayName: Stage Crash Reports
|
||||
condition: failed()
|
||||
|
Loading…
Reference in New Issue
Block a user