From c3ab785d66c0c1112a5b613191652b367ec0ce24 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 20 Mar 2019 12:09:23 -0400 Subject: [PATCH] test version script --- appveyor.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bd4e0b22..a4b3b876 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,8 +47,7 @@ install: } - ps: | if($isWindows) { - #$keytarVersion = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).dependencies.keytar - $keytarVersion = "4.3.0" + $keytarVersion = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).dependencies.keytar $nodeModVersion = node -e "console.log(process.config.variables.node_module_version)" $keytarTar = "keytar-v${keytarVersion}-node-v${nodeModVersion}-{0}-x64.tar" $keytarTarGz = "${keytarTar}.gz" @@ -115,6 +114,22 @@ build_script: Push-AppveyorArtifact .\dist-cli\bwdc-linux-sha256-${env:PACKAGE_VERSION}.txt } +test_script: +- ps: | + Expand-Archive -Path "./dist-cli/bwdc-windows-${env:PACKAGE_VERSION}.zip" -DestinationPath "./test/windows" + Expand-Archive -Path "./dist-cli/bwdc-macos-${env:PACKAGE_VERSION}.zip" -DestinationPath "./test/macos" + Expand-Archive -Path "./dist-cli/bwdc-linux-${env:PACKAGE_VERSION}.zip" -DestinationPath "./test/linux" + $testVersion = "unset" + if($isLinux) { + $testVersion = Invoke-Expression '& ./test/linux/bwdc -v' + } + else { + $testVersion = Invoke-Expression '& ./test/windows/bwdc.exe -v' + } + if($testVersion -ne $env:PACKAGE_VERSION) { + Throw "Version test failed." + } + on_finish: - ps: | if($isWindows -and $env:DEBUG_RDP -eq "true") {