From dcfbeafd44ec1c81fdc5c12c19e1eb136d8699ff Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 2 Feb 2019 16:54:29 -0500 Subject: [PATCH] more flexible deploy script --- deploy.ps1 | 56 ++++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/deploy.ps1 b/deploy.ps1 index c7fff85..2a2603f 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,31 +1,29 @@ +param([string]$arch = "86", [string]$folder = "Textractor$($arch)") + Set-Location $PSScriptRoot; -foreach ($arch in @("86", "64")) { - $folder = "Textractor$($arch)"; - $targets = @( - "Textractor.exe", - "TextractorCLI.exe", - "vc_redist.x$($arch).exe" - "vnrhook.dll", - "Qt5Core.dll", - "Qt5Gui.dll", - "Qt5Widgets.dll", - "LoaderDll.dll", - "LocaleEmulator.dll", - "Bing Translate.dll", - "Copy to Clipboard.dll", - "Extra Newlines.dll", - "Extra Window.dll", - "Google Translate.dll", - "Regex Filter.dll", - "Remove Repetition.dll", - "Replacer.dll", - "Thread Linker.dll", - "platforms", - "styles" - ) | ForEach-Object { "builds/RelWithDebInfo_x$($arch)/$($_)" }; - mkdir -Force -Verbose $folder; - Remove-Item -Force -Recurse -Verbose "$($folder)/*"; - Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets; - Compress-Archive -Force -Verbose -DestinationPath $folder -Path $folder; -} +$targets = @( + "Textractor.exe", + "TextractorCLI.exe", + "vnrhook.dll", + "Qt5Core.dll", + "Qt5Gui.dll", + "Qt5Widgets.dll", + "LoaderDll.dll", + "LocaleEmulator.dll", + "Bing Translate.dll", + "Copy to Clipboard.dll", + "Extra Newlines.dll", + "Extra Window.dll", + "Google Translate.dll", + "Regex Filter.dll", + "Remove Repetition.dll", + "Replacer.dll", + "Thread Linker.dll", + "platforms", + "styles" +) | ForEach-Object { "builds/RelWithDebInfo_x$($arch)/$($_)" }; +mkdir -Force -Verbose $folder; +Remove-Item -Force -Recurse -Verbose "$($folder)/*"; +Copy-Item -Force -Recurse -Verbose -Destination $folder -Path $targets; +Compress-Archive -Force -Verbose -DestinationPath "$($folder).zip" -Path $folder;