Skip to content

Commit

Permalink
ci: Update generate.ps1
Browse files Browse the repository at this point in the history
Implement fixes suggested in #1
  • Loading branch information
manekinekko authored Jan 17, 2025
1 parent 508380f commit 724f4b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions infra/hooks/postprovision/generate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $envFilePath = Join-Path -Path $rootDir -ChildPath ".env"
if (Test-Path $envFilePath) {
Get-Content $envFilePath | ForEach-Object {
if ($_ -match "^(.*?)=(.*)$") {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2].Trim('"'))
Write-Output "Loaded environment variable: $($matches[1])"
}
}
Expand Down Expand Up @@ -54,11 +54,12 @@ Write-Output 'Running "pnpm generate"'
# we do this by setting the AZURE_CLIENT_ID to an empty string before running the command
$env:AZURE_CLIENT_ID = ""
Try {
pnpm generate
npm install pnpm
pnpm install
Write-Output "Command 'pnpm generate' completed successfully"
} Catch {
Write-Error "Error: 'pnpm generate' failed"
exit 1
}

Write-Output "Script completed successfully"
Write-Output "Script completed successfully"

0 comments on commit 724f4b8

Please sign in to comment.