From c8505ea859955602b1113ebc98e806cb50bd429f Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 9 Apr 2024 14:20:02 -0400 Subject: [PATCH] Make packaging script for making releases --- make_pkg.ps1 | 2 -- package_release.ps1 | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) delete mode 100644 make_pkg.ps1 create mode 100644 package_release.ps1 diff --git a/make_pkg.ps1 b/make_pkg.ps1 deleted file mode 100644 index 30c9687..0000000 --- a/make_pkg.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -clear-host - diff --git a/package_release.ps1 b/package_release.ps1 new file mode 100644 index 0000000..7224f4f --- /dev/null +++ b/package_release.ps1 @@ -0,0 +1,14 @@ +clear-host + +$path_root = git rev-parse --show-toplevel +$path_plugins = join-path $path_root 'Plugins' + +$path_release = Join-Path $path_root 'Release' + +if ( -not(Test-Path $path_release) ) { New-Item -ItemType Directory -Path $path_release } + +$path_cog_zip = join-path $path_release 'Cog.zip' +if (Test-Path $path_cog_zip) { Remove-Item -Path $path_cog_zip } + +Get-ChildItem -Path $path_plugins | Compress-Archive -DestinationPath $path_cog_zip +Write-Host "Created zip file at $path_cog_zip"