Fix wrong Windows CI

This commit is contained in:
Federico Terzi 2019-09-21 13:46:00 +02:00
parent 83b0bdb7c0
commit 00820d4ba3
4 changed files with 19 additions and 3 deletions

View File

@ -12,6 +12,6 @@ steps:
- script: |
set -e
python packager.py build
cp target/release/espanso-*.gz .
cp target/packager/mac/espanso-*.gz .
ls -la
displayName: "Cargo build and packaging for MacOS"

View File

@ -11,7 +11,7 @@ steps:
- script: |
python packager.py build
copy "target\\release\\espanso-win-installer.exe" "espanso-win-installer.exe"
copy "target\\packager\\win\\espanso-win-installer.exe" "espanso-win-installer.exe"
dir
displayName: "Build and packaging for Windows"

View File

@ -10,6 +10,15 @@ steps:
- script: |
VER=$(cat Cargo.toml| grep version -m 1 | awk -F '"' '{ print $2 }')
echo '##vso[task.setvariable variable=vers]'v$VER
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
displayName: Obtain version from Cargo.toml on Unix
- powershell: |
Select-String -Path "Cargo.toml" -Pattern "version" | Select-Object -First 1 -outvariable v
$vv = [regex]::match($v, '"([^"]+)"').Groups[1].Value
echo "##vso[task.setvariable variable=vers]v$vv"
condition: eq(variables['Agent.OS'], 'Windows_NT')
displayName: Obtain version from Cargo.toml on Windows
- task: GitHubRelease@0
displayName: Create GitHub release

View File

@ -5,5 +5,12 @@ steps:
- template: install-rust.yml
- script: |
set -e
cargo test --release
displayName: cargo test
displayName: Cargo tests on Unix
condition: not(eq(variables['Agent.OS'], 'Windows_NT'))
- script: |
cargo test --release
displayName: Cargo tests on Windows
condition: eq(variables['Agent.OS'], 'Windows_NT')