Skip to content

Commit

Permalink
pass through config (debug or release) to getVersion script
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Jan 6, 2019
1 parent 5c11e27 commit 5fe14c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CalDavSynchronizer.Setup/getVersion.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$1=$args[0]
$3=$args[1]

$parent = (Get-Item $1).parent.FullName

$version = (Get-Item $parent"\CalDavSynchronizer\obj\Debug\CalDavSynchronizer.dll").VersionInfo.ProductVersion
$version = (Get-Item $parent"\CalDavSynchronizer\obj\$3\CalDavSynchronizer.dll").VersionInfo.ProductVersion

Out-File -FilePath $1"version.txt" -InputObject $version -Encoding ASCII -Width 50
2 changes: 1 addition & 1 deletion CalDavSynchronizer.Setup/postbuild.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /sha1 "86B0AE3B15989A793D3FAAC6187A8136F45EB52E" %2

powershell.exe -ExecutionPolicy ByPass -File "%1getVersion.ps1" %1
powershell.exe -ExecutionPolicy ByPass -File "%1getVersion.ps1" %1 %3
set /p version=<%1version.txt
"C:\Program Files (x86)\NSIS\makensis.exe" /DVERSION=%version% /DCONFIG=%3 %1SnapAppointmentsOutlookSync.nsi
del %1version.txt

0 comments on commit 5fe14c2

Please sign in to comment.