From 0756892932d55624b4e1b549829504987d63aa87 Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sat, 8 Jun 2024 15:32:25 +0100 Subject: [PATCH] feat(local-build): password --- src/local-build.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/local-build.ps1 b/src/local-build.ps1 index daa96fad5b..86e313b52d 100644 --- a/src/local-build.ps1 +++ b/src/local-build.ps1 @@ -2,6 +2,7 @@ param ( [switch]$AddLiveLog, [switch]$ReplaceOldPlaybook, [switch]$DontOpenPbLocation, + [switch]$NoPassword, [ValidateSet('Dependencies', 'Requirements', 'WinverRequirement', 'Verification', IgnoreCase = $true)] [array]$Removals, [string]$FileName = "Atlas Test" @@ -121,11 +122,12 @@ try { $files = "$rootTemp\7zFiles.txt" (Get-ChildItem -File -Exclude $excludeFiles -Recurse).FullName | Resolve-Path -Relative | ForEach-Object {$_.Substring(2)} | Out-File $files -Encoding utf8 - & $7zPath a -spf -y -mx1 -tzip "$apbxPath" `@"$files" | Out-Null + if (!$NoPassword) { $pass = '-p"malte"' } + & $7zPath a -spf -y -mx1 $pass -tzip "$apbxPath" `@"$files" | Out-Null # add edited files if (Test-Path "$playbookTemp\*.*") { Push-Location "$playbookTemp" - & $7zPath u "$apbxPath" * | Out-Null + & $7zPath u $pass "$apbxPath" * | Out-Null Pop-Location }