Permalink
Browse files

add release build script

  • Loading branch information...
1 parent c38fbf3 commit 76740b025a02ac44b5b3301d5c9fdc16948fce15 @azeier azeier committed Aug 4, 2016
Showing with 24 additions and 0 deletions.
  1. +24 −0 Build-Release.ps1
View
@@ -0,0 +1,24 @@
+$assemblyVersion = Get-Content "Hearthstone Deck Tracker\Properties\AssemblyInfo.cs" |
+ where { $_ -match '\[assembly: AssemblyVersion\("([\.\d]+)"\)\]' } |
+ foreach { $matches[1] }
+
+if ($assemblyVersion.EndsWith(".0")) {
+ $assemblyVersion = $assemblyVersion.Substring(0, $assemblyVersion.Length - 2)
+}
+
+$baseDir = "Hearthstone Deck Tracker\Releases"
+$targetDir = "$baseDir\v$assemblyVersion"
+if (Test-Path $targetDir) {
+ echo "build_release.ps1: build error 1: directory '$targetDir' already exists"
+ return
+}
+
+msbuild /p:Configuration=Release
+msbuild /p:Configuration=Squirrel
+
+mkdir $targetDir
+cp "$baseDir\RELEASES" $targetDir
+cp "$baseDir\Setup.exe" "$targetDir\HDT-Installer.exe"
+cp "$baseDir\*-delta.nupkg" $targetDir
+cp "$baseDir\*$assemblyVersion-full.nupkg" $targetDir
+cp "$baseDir\Hearthstone.Deck.Tracker-v$assemblyVersion.zip" $targetDir

0 comments on commit 76740b0

Please sign in to comment.