-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from Azure-Samples/writeenv
Move away from "azd env get-values > .env"
- Loading branch information
Showing
8 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Clear the contents of the .env file | ||
Set-Content -Path .env -Value "" | ||
|
||
# Append new values to the .env file | ||
$postgresDatabase = azd env get-value POSTGRES_DATABASE | ||
$postgresHost = azd env get-value POSTGRES_HOST | ||
$postgresSSL = azd env get-value POSTGRES_SSL | ||
$postgresUsername = azd env get-value POSTGRES_USERNAME | ||
|
||
Add-Content -Path .env -Value "POSTGRES_DATABASE=$postgresDatabase" | ||
Add-Content -Path .env -Value "POSTGRES_HOST=$postgresHost" | ||
Add-Content -Path .env -Value "POSTGRES_SSL=$postgresSSL" | ||
Add-Content -Path .env -Value "POSTGRES_USERNAME=$postgresUsername" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Clear the contents of the .env file | ||
> .env | ||
|
||
# Append new values to the .env file | ||
echo "POSTGRES_DATABASE=$(azd env get-value POSTGRES_DATABASE)" >> .env | ||
echo "POSTGRES_HOST=$(azd env get-value POSTGRES_HOST)" >> .env | ||
echo "POSTGRES_SSL=$(azd env get-value POSTGRES_SSL)" >> .env | ||
echo "POSTGRES_USERNAME=$(azd env get-value POSTGRES_USERNAME)" >> .env |