Browse Source
* Add dev folder, gitignore and user secrets * Update README and CONTRIBUTING Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>pull/26/head
5 changed files with 57 additions and 37 deletions
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
# How to Contribute |
||||
|
||||
Our [Contributing Guidelines](https://contributing.bitwarden.com/contributing/) are located in our [Contributing Documentation](https://contributing.bitwarden.com/). The documentation also includes recommended tooling, code style tips, and lots of other great information to get you started. |
||||
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
secrets.json |
||||
database.json |
||||
|
||||
# Development keys |
||||
*.key |
||||
*.crt |
||||
*.pfx |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
{ |
||||
"keyConnectorSettings": { |
||||
"database": { |
||||
"provider": "json", |
||||
"jsonFilePath": "{pathToThisRepository}/dev/database.json" |
||||
}, |
||||
"rsaKey": { |
||||
"provider": "certificate" |
||||
}, |
||||
"certificate": { |
||||
"provider": "filesystem", |
||||
"filesystemPath": "{pathToThisRepository}/dev/bwkc.pfx", |
||||
"filesystemPassword": "{Password}" |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env pwsh |
||||
# Helper script for applying the same user secrets to each project |
||||
# Duplicated from the server repo |
||||
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; |
||||
} |
||||
|
||||
if ($clear -eq $true) { |
||||
Write-Output "Deleting all existing user secrets" |
||||
} |
||||
|
||||
$projects = @{ |
||||
KeyConnector = "../src/KeyConnector" |
||||
} |
||||
|
||||
foreach ($key in $projects.keys) { |
||||
if ($clear -eq $true) { |
||||
dotnet user-secrets clear -p $projects[$key] |
||||
} |
||||
$output = Get-Content secrets.json | & dotnet user-secrets set -p $projects[$key] |
||||
Write-Output "$output - $key" |
||||
} |
||||
Loading…
Reference in new issue