-
Notifications
You must be signed in to change notification settings - Fork 0
/
Replace-Secrets.ps1
26 lines (24 loc) · 1.59 KB
/
Replace-Secrets.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Param(
[String]$uwpAppCenterKey,
[String]$androidAppCenterKey,
[String]$createPlayerFunctionCode,
[String]$getPlayerFunctionCode,
[String]$getPlayerQuestionsFunctionCode,
[String]$answerQuestionFunctionCode,
[String]$registerPushNotificationFunctionCode,
[String]$simulateDeveloperResponseFunctionCode,
[String]$setProfileVisibilityFunctionCode
)
#Main
$secretsContent = Get-Content "./Solene.MobileApp/Solene.MobileApp.Core/Consts/Secrets.cs";
$secretsContent = $secretsContent.Replace("<UwpReplaceMe>", $uwpAppCenterKey);
$secretsContent = $secretsContent.Replace("<AndroidReplaceMe>", $androidAppCenterKey);
$secretsContent = $secretsContent.Replace("<CreatePlayerFunctionCodeFunctionsReplaceMe>", $createPlayerFunctionCode);
$secretsContent = $secretsContent.Replace("<GetPlayerFunctionCodeReplaceMe>", $getPlayerFunctionCode);
$secretsContent = $secretsContent.Replace("<GetPlayerQuestionsFunctionCodeReplaceMe>", $getPlayerQuestionsFunctionCode);
$secretsContent = $secretsContent.Replace("<AnswerQuestionFunctionCodeReplaceMe>", $answerQuestionFunctionCode);
$secretsContent = $secretsContent.Replace("<RegisterPushNotificationsCodeReplaceMe>", $registerPushNotificationFunctionCode);
$secretsContent = $secretsContent.Replace("<SimulateDeveloperResponseFunctionCodeReplaceMe>", $simulateDeveloperResponseFunctionCode);
$secretsContent = $secretsContent.Replace("<SetProfileVisibilityReplaceMe>", $setProfileVisibilityFunctionCode);
Set-Content "./Solene.MobileApp/Solene.MobileApp.Core/Consts/Secrets.cs" $secretsContent;
Write-Host "Contents of Secrets.cs filled in with keys.";