1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

Simplify development environment setup (#1588)

This commit is contained in:
Oscar Hinton
2021-10-13 19:30:03 +02:00
committed by GitHub
parent 7802c2b969
commit 964e262d44
17 changed files with 429 additions and 149 deletions

21
dev/setup_secrets.ps1 Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env pwsh
# Helper script for applying the same user secrets to each project
param (
[bool]$clear,
[Parameter(ValueFromRemainingArguments = $true, Position=1)]
$cmdArgs
)
if (!(Test-Path "secrets.json")) {
Write-Warning "No secrets.json file found, please copy and modify the provided example";
exit;
}
$projects = "Admin", "Api", "Billing", "Events", "EventsProcessor", "Icons", "Identity", "Notifications";
foreach ($projects in $projects) {
if ($clear -eq $true) {
dotnet user-secrets clear -p "../src/$projects"
}
Get-Content secrets.json | & dotnet user-secrets set -p "../src/$projects"
}