|
| 1 | +## Copyright (c) MediaArea.net SARL. All Rights Reserved. |
| 2 | +## |
| 3 | +## Use of this source code is governed by a BSD-style license that can |
| 4 | +## be found in the License.html file in the root of the source tree. |
| 5 | +## |
| 6 | + |
| 7 | +$ErrorActionPreference = "Stop" |
| 8 | + |
| 9 | +#----------------------------------------------------------------------- |
| 10 | +# Setup |
| 11 | +$release_directory = Split-Path -Parent $MyInvocation.MyCommand.Path |
| 12 | +$version = (Get-Content (Join-Path (Split-Path $release_directory -Parent) "Project\version.txt") -Raw).Trim() |
| 13 | + |
| 14 | +#----------------------------------------------------------------------- |
| 15 | +# Cleanup |
| 16 | +$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64" |
| 17 | +if (Test-Path $artifact) { |
| 18 | + Remove-Item $artifact -Force -Recurse |
| 19 | +} |
| 20 | + |
| 21 | +$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64.zip" |
| 22 | +if (Test-Path $artifact) { |
| 23 | + Remove-Item $artifact -Force |
| 24 | +} |
| 25 | + |
| 26 | +$artifact = Join-Path $release_directory "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip" |
| 27 | +if (Test-Path $artifact) { |
| 28 | + Remove-Item $artifact -Force |
| 29 | +} |
| 30 | + |
| 31 | +#----------------------------------------------------------------------- |
| 32 | +# Package cli |
| 33 | +Push-Location $release_directory |
| 34 | + New-Item -ItemType Directory -Path "RAWcooked_CLI_${version}_Windows_x64" -Force |
| 35 | + |
| 36 | + Push-Location "RAWcooked_CLI_${version}_Windows_x64" |
| 37 | + Copy-Item (Join-Path (Split-Path $release_directory -Parent) "Project\MSVC2022\CLI\x64\Release\RAWcooked.exe") -Force |
| 38 | + Copy-Item (Join-Path (Split-Path $release_directory -Parent) "History_CLI.txt") -Force |
| 39 | + Copy-Item (Join-Path (Split-Path $release_directory -Parent) "License.html") -Force |
| 40 | + |
| 41 | + & 7za.exe a -r -tzip "..\RAWcooked_CLI_${version}_Windows_x64.zip" * |
| 42 | + Pop-Location |
| 43 | +Pop-Location |
| 44 | + |
| 45 | +#----------------------------------------------------------------------- |
| 46 | +# Package pdb |
| 47 | +Push-Location $release_directory |
| 48 | + & 7za.exe a -r -tzip "RAWcooked_CLI_${version}_Windows_x64_DebugInfo.zip" "..\Project\MSVC2022\CLI\x64\Release\RAWcooked.pdb" |
| 49 | +Pop-Location |
0 commit comments