Skip to content

Commit

Permalink
Fix (ci): Comment out secret env vars in .env in generated branches (
Browse files Browse the repository at this point in the history
…#179)

Fixes bug in #152
  • Loading branch information
leojonathanoh authored Dec 9, 2023
1 parent 01e7473 commit 8a29a08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Generate-GitBranches.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function Get-EnvFileKv ($file, $branch) {
if ($branchFiles -contains $file) {
$content = { git --no-pager show "${branch}:${file}" } | Execute-Command
$content | % {
if ($_ -match '^(\w+)=(.*)$') {
if ($_ -match '^#*\s*(\w+)=(.*)$') {
$kv[$matches[1]] = $matches[2]
}else {
throw "File '$file' is not in a valid k=v format. Invalid line: $_"
Expand Down Expand Up @@ -221,11 +221,11 @@ NO_PULL=
NO_TEST=
NO_PUSH=
DOCKER_REPOSITORY=$( $g['docker_repository'] )
REGISTRY_USER=
REGISTRY_PASSWORD=
#REGISTRY_USER=
#REGISTRY_PASSWORD=
STEAM_LOGIN=
STEAM_USERNAME=
STEAM_PASSWORD=
#STEAM_USERNAME=
#STEAM_PASSWORD=
"@ | Out-File .env -Encoding utf8 -Force

$kv = Get-EnvFileKv '.state' $branch
Expand Down

0 comments on commit 8a29a08

Please sign in to comment.