diff --git a/ci/build-macos.yml b/ci/build-macos.yml index af275e2..fc3fdbc 100644 --- a/ci/build-macos.yml +++ b/ci/build-macos.yml @@ -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" \ No newline at end of file diff --git a/ci/build-win.yml b/ci/build-win.yml index 39ea2b5..726a210 100644 --- a/ci/build-win.yml +++ b/ci/build-win.yml @@ -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" diff --git a/ci/deploy.yml b/ci/deploy.yml index c9f2659..d429d6d 100644 --- a/ci/deploy.yml +++ b/ci/deploy.yml @@ -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 diff --git a/ci/test.yml b/ci/test.yml index 1436b3a..480837d 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -5,5 +5,12 @@ steps: - template: install-rust.yml - script: | + set -e cargo test --release - displayName: cargo test \ No newline at end of file + 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') \ No newline at end of file