summaryrefslogtreecommitdiffstats
path: root/ci/before_deploy.ps1
diff options
context:
space:
mode:
authorSam Tay <sam.chong.tay@gmail.com>2020-06-25 02:10:48 -0700
committerSam Tay <sam.chong.tay@gmail.com>2020-06-25 02:23:23 -0700
commit1c90502a3c4f735a7546a1147b100946f1a5af01 (patch)
treec932a54055229911f120fcc15e54d266bfae849f /ci/before_deploy.ps1
parent3216d47824f3f15e11a60132b2c559fc4796d59c (diff)
Add CI courtesy of trust & cross
Diffstat (limited to 'ci/before_deploy.ps1')
-rw-r--r--ci/before_deploy.ps122
1 files changed, 22 insertions, 0 deletions
diff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1
new file mode 100644
index 0000000..5bc9388
--- /dev/null
+++ b/ci/before_deploy.ps1
@@ -0,0 +1,22 @@
+# This script takes care of packaging the build artifacts that will go in the
+# release zipfile
+
+$SRC_DIR = $pwd.Path
+$STAGE = [System.Guid]::NewGuid().ToString()
+
+Set-Location $env:TEMP
+New-Item -Type Directory -Name $STAGE
+Set-Location $STAGE
+
+$ZIP = "$SRC_DIR\$($env:CRATE_NAME)-$($env:APPVEYOR_REPO_TAG_NAME)-$($env:TARGET).zip"
+
+Copy-Item "$SRC_DIR\target\$($env:TARGET)\release\$($env:CRATE_NAME).exe" '.\'
+
+7z a "$ZIP" *
+
+Push-AppveyorArtifact "$ZIP"
+
+Remove-Item *.* -Force
+Set-Location ..
+Remove-Item $STAGE
+Set-Location $SRC_DIR