Skip to content

Commit

Permalink
feat(local-build): password
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als committed Jun 8, 2024
1 parent 9fb62fd commit 0756892
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/local-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 0756892

Please sign in to comment.