File tree Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -571,10 +571,19 @@ void PrintFailedTests(XElement element)
571
571
<!-- Checks if the environment variable 'SENTRY_AUTH_TOKEN' has been set and creates the SentryCliOptions.asset for the sample project
572
572
This is meant for developers - so they don't have to configure the CLI options after each clean checkout (or git clean).
573
573
Gets automatically run after 'DownloadNativeSDKs'
574
- dotnet msbuild /t:SetupSampleSentryCliOptions src/Sentry.Unity -->
575
- <Target Name =" SetupSampleSentryCliOptions " AfterTargets =" DownloadNativeSDKs" Condition =" '$(MSBuildProjectName)' == 'Sentry.Unity' AND '$(SENTRY_AUTH_TOKEN)' != ''" >
574
+ dotnet msbuild /t:SamplesSetupCliOptions src/Sentry.Unity -->
575
+ <Target Name =" SamplesSetupCliOptions " AfterTargets =" DownloadNativeSDKs" Condition =" '$(MSBuildProjectName)' == 'Sentry.Unity' AND '$(SENTRY_AUTH_TOKEN)' != ''" >
576
576
<Message Importance =" High" Text =" Found environment variable 'SENTRY_AUTH_TOKEN'. Creating Sentry CLI options for sample project. " />
577
- <Exec Command =" pwsh " $(RepoRoot)scripts/create-sentry-cli-options.ps1" " />
577
+ <Exec Command =" pwsh " $(RepoRoot)scripts/samples-setup-cli-options.ps1" " />
578
+ </Target >
579
+
580
+ <!-- Checks if the environment variable 'APPLE_ID' has been set and modifies the ProjectSettings.asset for the sample project
581
+ This is meant for developers - so they don't have to configure the playersettings after each clean checkout (or git clean).
582
+ Gets automatically run after 'SamplesSetupCliOptions'
583
+ dotnet msbuild /t:SamplesSetupAppleId src/Sentry.Unity -->
584
+ <Target Name =" SamplesSetupAppleId" AfterTargets =" SetupSampleSentryCliOptions" Condition =" '$(MSBuildProjectName)' == 'Sentry.Unity' AND '$(APPLE_ID)' != ''" >
585
+ <Message Importance =" High" Text =" Found environment variable 'APPLE_ID'. Setting Apple ID for sample project. " />
586
+ <Exec Command =" pwsh " $(RepoRoot)scripts/samples-setup-apple-id.ps1" " />
578
587
</Target >
579
588
580
589
<!-- Downloads native SDKs from the latest successful GitHub Actions workflow run.
Original file line number Diff line number Diff line change
1
+ Set-StrictMode - Version latest
2
+ $ErrorActionPreference = " Stop"
3
+
4
+ Write-Output " Setting up Apple Developer Team ID from environment variable"
5
+
6
+ if (-not $Env: APPLE_ID )
7
+ {
8
+ Write-Error " APPLE_ID environment variable is not set. Skipping..."
9
+ exit
10
+ }
11
+
12
+ $appleId = $Env: APPLE_ID
13
+ $projectSettingsPath = " $PSScriptRoot /../samples/unity-of-bugs/ProjectSettings/ProjectSettings.asset"
14
+ if (-not (Test-Path - Path $projectSettingsPath ))
15
+ {
16
+ Write-Error " ProjectSettings.asset not found at path: $projectSettingsPath "
17
+ exit
18
+ }
19
+
20
+ $content = Get-Content - Path $projectSettingsPath - Raw
21
+ if ($content -match ' (\s*)appleDeveloperTeamID:.*' )
22
+ {
23
+ $updatedContent = $content -replace ' (\s*)appleDeveloperTeamID:.*' , " `$ {1}appleDeveloperTeamID: $appleId "
24
+ Set-Content - Path $projectSettingsPath - Value $updatedContent
25
+ Write-Output " Successfully updated appleDeveloperTeamID in ProjectSettings.asset"
26
+ }
27
+ else
28
+ {
29
+ Write-Error " Could not find appleDeveloperTeamID property in ProjectSettings.asset"
30
+ exit
31
+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments