Skip to content

Commit

Permalink
add release build tool
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaBs committed May 31, 2020
1 parent 96ed22c commit 1dedf96
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,5 @@ paket-files/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
/CmlLib/Nuget/CmlLib.Core/lib

./release
27 changes: 27 additions & 0 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
if ($args.Length -gt 0)
{
$ver=$args[0]
}
else
{
$ver = Read-Host 'version'
}

Remove-Item -Path .\release -Confirm -Recurse

mkdir .\release\CmlLib.Core.$ver
mkdir .\release\SampleCoreLauncher$ver
mkdir .\release\SampleWinformLauncher$ver

Copy-Item .\CmlLib\bin\Release\* -Destination .\release\CmlLib.Core.$ver -Recurse
Get-ChildItem .\release\CmlLib.Core.$ver -Recurse -File | Where {($_.Extension -ne ".dll")} | Remove-Item
Copy-Item -Path .\CmlLibCoreSample\bin\Release\netcoreapp3.1\* -Destination .\release\SampleCoreLauncher$ver
Copy-Item .\CmlLibWinFormSample\bin\Release\* -Destination .\release\SampleWinformLauncher$ver -Include *.exe,*.dll,*.pdb,*.config

Compress-Archive -Path .\release\CmlLib.Core.$ver -DestinationPath .\release\CmlLib.Core.$ver.zip
Compress-Archive -Path .\release\SampleCoreLauncher$ver -DestinationPath .\release\SampleCoreLauncher$ver.zip
Compress-Archive -Path .\release\SampleWinformLauncher$ver -DestinationPath .\release\SampleWinformLauncher$ver.zip

Remove-Item -Path .\release\CmlLib.Core.$ver -Confirm -Recurse
Remove-Item -Path .\release\SampleCoreLauncher$ver -Confirm -Recurse
Remove-Item -Path .\release\SampleWinformLauncher$ver -Confirm -Recurse

0 comments on commit 1dedf96

Please sign in to comment.