mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2025-09-15 06:13:26 +00:00
Migrate cert.cert if exists
This commit is contained in:
parent
70517634a5
commit
08a6b94d47
|
@ -7,7 +7,7 @@ $tempdirectory = "$pwd\temp"
|
|||
$components = "Api","Identity"
|
||||
|
||||
# delete old directories / files if applicable
|
||||
if (Test-Path "$tempdirectory") {
|
||||
if (Test-Path "$tempdirectory" -PathType Container) {
|
||||
Remove-Item "$tempdirectory" -Recurse -Force
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,13 @@ if (Test-Path -Path "$pwd\src\bitBetter\cert.cer" -PathType Leaf) {
|
|||
Remove-Item "$pwd\src\bitBetter\cert.cer" -Force
|
||||
}
|
||||
|
||||
if (Test-Path "$pwd\.keys\cert.cert" -PathType Leaf) {
|
||||
Rename-Item -Path "$pwd\.keys\cert.cert" -NewName "$pwd\.keys\cert.cer"
|
||||
}
|
||||
|
||||
|
||||
# generate keys if none are available
|
||||
if (!(Test-Path "$pwd\.keys")) {
|
||||
if (!(Test-Path "$pwd\.keys" -PathType Container)) {
|
||||
.\generateKeys.ps1
|
||||
}
|
||||
|
||||
|
|
4
build.sh
4
build.sh
|
@ -24,6 +24,10 @@ if [ -f "$PWD/src/bitBetter/cert.cer" ]; then
|
|||
rm -f "$PWD/src/bitBetter/cert.cer"
|
||||
fi
|
||||
|
||||
if [ -f "$PWD/.keys/cert.cert" ]; then
|
||||
mv "$PWD/.keys/cert.cert" "$PWD/.keys/cert.cer"
|
||||
fi
|
||||
|
||||
# generate keys if none are available
|
||||
if [ ! -d "$PWD/.keys" ]; then
|
||||
./generateKeys.sh
|
||||
|
|
Loading…
Reference in New Issue
Block a user