diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74c65a1b4..a0602a548 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -241,6 +241,30 @@ jobs: name: Test results (editmode) path: artifacts/test/editmode + package-validation: + needs: [build] + name: UPM Package validation + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v2.3.3 + + - name: Download UPM package + uses: actions/download-artifact@v2 + with: + # Artifact name is the commit sha. Which is what craft uses to find the relevant artifact. + name: ${{ github.sha }} + + - name: Verify package content against snapshot + shell: pwsh + # If this step fails, you can accept the new file content by + # running the following script locally with 'accept' as an argument + # and committing the new snapshot file to your branch. i.e: + # pwsh ./test/Scripts.Tests/test-pack-contents.ps1 accept + run: ./test/Scripts.Tests/test-pack-contents.ps1 + android-smoke-test: needs: [build] name: Smoke Test - Android ${{ matrix.api-level }} Unity ${{ matrix.unity-version }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e93d1f931..4f2a0c73e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -138,6 +138,15 @@ In order to run the tests * open `TestRunner` via `Windows -> General -> Test Runner` * run `PlayMode` or `EditMode` tests +### Package validation + +In CI, a workflow validates that the content of the package doesn't change accidentally. +If you intentially want to add or remove files in the final UPM package. You need to accept the diff: + +``` +pwsh ./test/Scripts.Tests/test-pack-contents.ps1 accept +``` + ## Release The release is done by pushing the artifact built in CI [to a new repo](https://github.com/getsentry/unity). The artifact is built by using the template files in the `package` directory. In order to make a release, the contents of `package-dev/Editor` and `package-dev/Runtime` folders should be copied into `package`. diff --git a/package/Editor.meta b/package/Editor.meta deleted file mode 100644 index 6b2c8b84c..000000000 --- a/package/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0cc3ff4f9b29375429a1ed7ebd3768cc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package/README.md.meta b/package/README.md.meta deleted file mode 100644 index d6bb28eae..000000000 --- a/package/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 609ca64c0dfb5f5479affc9eaa04669b -PackageManifestImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package/Runtime.meta b/package/Runtime.meta deleted file mode 100644 index 895cd4774..000000000 --- a/package/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 006c2739d242889489e5e56b8d2634f9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/package/package.json.meta b/package/package.json.meta deleted file mode 100644 index d6bb28eae..000000000 --- a/package/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 609ca64c0dfb5f5479affc9eaa04669b -PackageManifestImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index f502826a4..1b7522f71 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -1,24 +1,29 @@ +Remove-Item "package-release" -Recurse -ErrorAction SilentlyContinue New-Item "package-release" -ItemType Directory -# Copy `package-dev` stuff -Copy-Item "package-dev/*" -Destination "package-release/" -Exclude "README.md", "package.json", "Tests", "Tests.meta", "*.asmdef", "*.asmdef.meta", "SentryOptions.json*" -Recurse +$exclude = @( + "README.md", + "package.json", + "Tests", + "Tests.meta", + "*.asmdef", + "*.asmdef.meta", + "SentryOptions.json*", + "alias-references.*", + "assembly-alias.*" +) + +Copy-Item "package-dev/*" "package-release/" -Exclude $exclude -Recurse + +# Override with package (e.g. custom .meta files) +Copy-Item "package/*" -Destination "package-release/" -Recurse -Force -# Copy `package` stuff -Copy-Item "package/package.json" -Destination "package-release/package.json" -Copy-Item "package/README.md" -Destination "package-release/README.md" Copy-Item "CHANGELOG.md" -Destination "package-release/CHANGELOG.md" -Copy-Item "package/CHANGELOG.md.meta" -Destination "package-release/CHANGELOG.md.meta" Copy-Item "LICENSE.md" -Destination "package-release/LICENSE.md" -Copy-Item "package/LICENSE.md.meta" -Destination "package-release/LICENSE.md.meta" -New-Item -Type dir "package-release/Runtime/" -Force -Get-ChildItem "package/Runtime/" -Include "*.asmdef", "*.asmdef.meta" -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination "package-release/Runtime/" } -# Destination directory need to exist if we're copying a file instead of a directory -New-Item -Type dir "package-release/Documentation~/" -Force -Get-ChildItem "package/Documentation~/" -Include "*.md" -Recurse | ForEach-Object { Copy-Item -Path $_.FullName -Destination "package-release/Documentation~/" } # Copy samples -Copy-Item "samples/unity-of-bugs/Assets/Scenes" -Destination "package-release/Samples~/unity-of-bugs/Assets/Scenes" -Recurse -Copy-Item "samples/unity-of-bugs/Assets/Scripts" -Destination "package-release/Samples~/unity-of-bugs/Assets/Scripts" -Recurse +Copy-Item "samples/unity-of-bugs/Assets/Scenes" -Destination "package-release/Samples~/unity-of-bugs/Scenes" -Recurse +Copy-Item "samples/unity-of-bugs/Assets/Scripts" -Destination "package-release/Samples~/unity-of-bugs/Scripts" -Recurse # Create zip Compress-Archive "package-release/*" -DestinationPath "package-release.zip" -Force diff --git a/test/Scripts.Tests/package-release.zip.snapshot b/test/Scripts.Tests/package-release.zip.snapshot new file mode 100644 index 000000000..15b6eed12 --- /dev/null +++ b/test/Scripts.Tests/package-release.zip.snapshot @@ -0,0 +1,341 @@ +Documentation~/index.md +Editor/iOS.meta +Editor/sentry-cli.meta +Editor/Sentry.Unity.Editor.dll +Editor/Sentry.Unity.Editor.dll.meta +Editor/iOS/Sentry.Unity.Editor.iOS.dll +Editor/iOS/Sentry.Unity.Editor.iOS.dll.meta +Editor/sentry-cli/sentry-cli-Darwin-universal +Editor/sentry-cli/sentry-cli-Darwin-universal.meta +Editor/sentry-cli/sentry-cli-Linux-x86_64 +Editor/sentry-cli/sentry-cli-Linux-x86_64.meta +Editor/sentry-cli/sentry-cli-Windows-x86_64.exe +Editor/sentry-cli/sentry-cli-Windows-x86_64.exe.meta +Plugins/Android.meta +Plugins/iOS.meta +Plugins/iOS/Device.meta +Plugins/iOS/SentryNativeBridge.m +Plugins/iOS/SentryNativeBridge.m.meta +Plugins/iOS/Simulator.meta +Plugins/iOS/Simulator/Sentry.framework.meta +Plugins/iOS/Simulator/Sentry.framework/_CodeSignature.meta +Plugins/iOS/Simulator/Sentry.framework/Headers.meta +Plugins/iOS/Simulator/Sentry.framework/Info.plist +Plugins/iOS/Simulator/Sentry.framework/Info.plist.meta +Plugins/iOS/Simulator/Sentry.framework/Modules.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders.meta +Plugins/iOS/Simulator/Sentry.framework/Sentry +Plugins/iOS/Simulator/Sentry.framework/Sentry.meta +Plugins/iOS/Simulator/Sentry.framework/_CodeSignature/CodeResources +Plugins/iOS/Simulator/Sentry.framework/_CodeSignature/CodeResources.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSData+SentryCompression.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSData+SentryCompression.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSDate+SentryExtras.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSDate+SentryExtras.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSDictionary+SentrySanitize.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/NSDictionary+SentrySanitize.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryLog.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryLog.h.meta +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryRequestOperation.h +Plugins/iOS/Simulator/Sentry.framework/PrivateHeaders/SentryRequestOperation.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/PrivateSentrySDKOnly.h +Plugins/iOS/Simulator/Sentry.framework/Headers/PrivateSentrySDKOnly.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/Sentry.h +Plugins/iOS/Simulator/Sentry.framework/Headers/Sentry.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryAppStartMeasurement.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryAppStartMeasurement.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryAttachment.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryAttachment.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryBreadcrumb.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryBreadcrumb.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryClient.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryClient.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryCrashExceptionApplication.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryCrashExceptionApplication.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDebugImageProvider.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDebugImageProvider.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDebugMeta.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDebugMeta.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDefines.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDefines.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDsn.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryDsn.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEnvelope.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEnvelope.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEnvelopeItemType.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEnvelopeItemType.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryError.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryError.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEvent.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryEvent.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryException.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryException.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryFrame.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryFrame.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryHub.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryHub.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryId.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryId.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryIntegrationProtocol.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryIntegrationProtocol.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMechanism.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMechanism.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMechanismMeta.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMechanismMeta.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMessage.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryMessage.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryNSError.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryNSError.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryOptions.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryOptions.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySampleDecision.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySampleDecision.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySamplingContext.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySamplingContext.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryScope.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryScope.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryScreenFrames.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryScreenFrames.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySDK.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySDK.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySdkInfo.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySdkInfo.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySerializable.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySerializable.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySession.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySession.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanContext.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanContext.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanId.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanId.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanProtocol.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanProtocol.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanStatus.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentrySpanStatus.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryStacktrace.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryStacktrace.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryThread.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryThread.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryTraceHeader.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryTraceHeader.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryTransactionContext.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryTransactionContext.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryUser.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryUser.h.meta +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryUserFeedback.h +Plugins/iOS/Simulator/Sentry.framework/Headers/SentryUserFeedback.h.meta +Plugins/iOS/Simulator/Sentry.framework/Modules/module.modulemap +Plugins/iOS/Simulator/Sentry.framework/Modules/module.modulemap.meta +Plugins/iOS/Device/Sentry.framework.meta +Plugins/iOS/Device/Sentry.framework/Headers.meta +Plugins/iOS/Device/Sentry.framework/Info.plist +Plugins/iOS/Device/Sentry.framework/Info.plist.meta +Plugins/iOS/Device/Sentry.framework/Modules.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders.meta +Plugins/iOS/Device/Sentry.framework/Sentry +Plugins/iOS/Device/Sentry.framework/Sentry.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSData+SentryCompression.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSData+SentryCompression.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSDate+SentryExtras.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSDate+SentryExtras.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSDictionary+SentrySanitize.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/NSDictionary+SentrySanitize.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryAsynchronousOperation.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryAutoSessionTrackingIntegration.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashInstallationReporter.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashReportConverter.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryCrashReportSink.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryLog.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryLog.h.meta +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryRequestOperation.h +Plugins/iOS/Device/Sentry.framework/PrivateHeaders/SentryRequestOperation.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/PrivateSentrySDKOnly.h +Plugins/iOS/Device/Sentry.framework/Headers/PrivateSentrySDKOnly.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/Sentry.h +Plugins/iOS/Device/Sentry.framework/Headers/Sentry.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryAppStartMeasurement.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryAppStartMeasurement.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryAttachment.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryAttachment.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryBreadcrumb.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryBreadcrumb.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryClient.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryClient.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryCrashExceptionApplication.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryCrashExceptionApplication.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryDebugImageProvider.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryDebugImageProvider.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryDebugMeta.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryDebugMeta.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryDefines.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryDefines.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryDsn.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryDsn.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryEnvelope.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryEnvelope.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryEnvelopeItemType.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryEnvelopeItemType.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryError.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryError.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryEvent.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryEvent.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryException.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryException.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryFrame.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryFrame.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryHub.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryHub.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryId.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryId.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryIntegrationProtocol.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryIntegrationProtocol.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryMechanism.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryMechanism.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryMechanismMeta.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryMechanismMeta.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryMessage.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryMessage.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryNSError.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryNSError.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryOptions.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryOptions.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySampleDecision.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySampleDecision.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySamplingContext.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySamplingContext.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryScope.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryScope.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryScreenFrames.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryScreenFrames.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySDK.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySDK.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySdkInfo.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySdkInfo.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySerializable.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySerializable.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySession.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySession.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanContext.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanContext.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanId.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanId.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanProtocol.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanProtocol.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanStatus.h +Plugins/iOS/Device/Sentry.framework/Headers/SentrySpanStatus.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryStacktrace.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryStacktrace.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryThread.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryThread.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryTraceHeader.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryTraceHeader.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryTransactionContext.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryTransactionContext.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryUser.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryUser.h.meta +Plugins/iOS/Device/Sentry.framework/Headers/SentryUserFeedback.h +Plugins/iOS/Device/Sentry.framework/Headers/SentryUserFeedback.h.meta +Plugins/iOS/Device/Sentry.framework/Modules/module.modulemap +Plugins/iOS/Device/Sentry.framework/Modules/module.modulemap.meta +Plugins/Android/Sentry.meta +Plugins/Android/Sentry/gson-2.8.5.jar +Plugins/Android/Sentry/gson-2.8.5.jar.meta +Plugins/Android/Sentry/sentry-5.4.0.jar +Plugins/Android/Sentry/sentry-5.4.0.jar.meta +Plugins/Android/Sentry/sentry-android-core-release.aar +Plugins/Android/Sentry/sentry-android-core-release.aar.meta +Plugins/Android/Sentry/sentry-android-ndk-release.aar +Plugins/Android/Sentry/sentry-android-ndk-release.aar.meta +Runtime/io.sentry.unity.runtime.asmdef +Runtime/io.sentry.unity.runtime.asmdef.meta +Runtime/Sentry.dll +Runtime/Sentry.dll.meta +Runtime/Sentry.Microsoft.Bcl.AsyncInterfaces.dll +Runtime/Sentry.Microsoft.Bcl.AsyncInterfaces.dll.meta +Runtime/Sentry.System.Buffers.dll +Runtime/Sentry.System.Buffers.dll.meta +Runtime/Sentry.System.Collections.Immutable.dll +Runtime/Sentry.System.Collections.Immutable.dll.meta +Runtime/Sentry.System.Memory.dll +Runtime/Sentry.System.Memory.dll.meta +Runtime/Sentry.System.Numerics.Vectors.dll +Runtime/Sentry.System.Numerics.Vectors.dll.meta +Runtime/Sentry.System.Reflection.Metadata.dll +Runtime/Sentry.System.Reflection.Metadata.dll.meta +Runtime/Sentry.System.Runtime.CompilerServices.Unsafe.dll +Runtime/Sentry.System.Runtime.CompilerServices.Unsafe.dll.meta +Runtime/Sentry.System.Text.Encodings.Web.dll +Runtime/Sentry.System.Text.Encodings.Web.dll.meta +Runtime/Sentry.System.Text.Json.dll +Runtime/Sentry.System.Text.Json.dll.meta +Runtime/Sentry.System.Threading.Tasks.Extensions.dll +Runtime/Sentry.System.Threading.Tasks.Extensions.dll.meta +Runtime/Sentry.Unity.Android.dll +Runtime/Sentry.Unity.Android.dll.meta +Runtime/Sentry.Unity.Android.pdb +Runtime/Sentry.Unity.Android.pdb.meta +Runtime/Sentry.Unity.dll +Runtime/Sentry.Unity.dll.meta +Runtime/Sentry.Unity.iOS.dll +Runtime/Sentry.Unity.iOS.dll.meta +Runtime/Sentry.Unity.iOS.pdb +Runtime/Sentry.Unity.iOS.pdb.meta +Runtime/Sentry.Unity.pdb +Runtime/Sentry.Unity.pdb.meta +Runtime/Sentry.xml +Runtime/Sentry.xml.meta +Runtime/SentryInitialization.cs +Runtime/SentryInitialization.cs.meta +Samples~/unity-of-bugs/Scenes.meta +Samples~/unity-of-bugs/Scripts.meta +Samples~/unity-of-bugs/Scenes/1_Bugfarm.unity +Samples~/unity-of-bugs/Scenes/1_Bugfarm.unity.meta +Samples~/unity-of-bugs/Scenes/2_MobileNativeSupport.unity +Samples~/unity-of-bugs/Scenes/2_MobileNativeSupport.unity.meta +Samples~/unity-of-bugs/Scenes/3_Transition.unity +Samples~/unity-of-bugs/Scenes/3_Transition.unity.meta +Samples~/unity-of-bugs/Scripts/BugFarmButtons.cs +Samples~/unity-of-bugs/Scripts/BugFarmButtons.cs.meta +Samples~/unity-of-bugs/Scripts/CloseGameButton.cs +Samples~/unity-of-bugs/Scripts/CloseGameButton.cs.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport.meta +Samples~/unity-of-bugs/Scripts/SmokeTester.cs +Samples~/unity-of-bugs/Scripts/SmokeTester.cs.meta +Samples~/unity-of-bugs/Scripts/TransitionSceneButtons.cs +Samples~/unity-of-bugs/Scripts/TransitionSceneButtons.cs.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/CPlugin.c +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/CPlugin.c.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/CppPlugin.cpp +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/CppPlugin.cpp.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/KotlinPlugin.kt +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/KotlinPlugin.kt.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/NativeSupportButtons.cs +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/NativeSupportButtons.cs.meta +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/ObjectiveCPlugin.m +Samples~/unity-of-bugs/Scripts/MobileNativeSupport/ObjectiveCPlugin.m.meta +CHANGELOG.md +CHANGELOG.md.meta +Editor.meta +LICENSE.md +LICENSE.md.meta +package.json +package.json.meta +Plugins.meta +README.md +README.md.meta +Runtime.meta diff --git a/test/Scripts.Tests/test-pack-contents.ps1 b/test/Scripts.Tests/test-pack-contents.ps1 new file mode 100755 index 000000000..6ebf61458 --- /dev/null +++ b/test/Scripts.Tests/test-pack-contents.ps1 @@ -0,0 +1,47 @@ +# Verifies the contents of the UPM package against a snapshot file +# 'dotnet build' and 'pack.ps1' must have already been run + +# To accept a new snapshot file, run 'pwsh ./test.ps1 accept' + +$ErrorActionPreference = "Stop" + +$projectRoot = "$PSScriptRoot/../.." +$snapshotFile = "$PSScriptRoot/package-release.zip.snapshot" +$packageFile = "$projectRoot/package-release.zip" + +Push-Location $projectRoot + +if (-not(Test-Path -Path $packageFile)) { + Write-Host "Package '$packageFile' not found. +Run 'scripts/pack.ps1' first." + exit 1 +} + +if (-not(Test-Path -Path $snapshotFile)) { + Write-Host "Snapshot file '$snapshotFile' not found. +Can't compare package contents against baseline." + exit 2 +} + +$zip = [IO.Compression.ZipFile]::OpenRead($packageFile) +try { + $snapshotContent = $zip.Entries + if ($args.Count -gt 0 -and $args[0] -eq "accept") { + # Override the snapshot file with the current package contents + $snapshotContent.FullName | Out-File $snapshotFile + } + $result = Compare-Object $snapshotContent.FullName (Get-Content $snapshotFile) + Write-Host $result + if ($result.count -eq 0) + { + Write-Host "Package contents match snapshot." + } + else + { + Write-Host "Package contents do not match snapshot." + $result | Format-Table -AutoSize + exit 3 + } +} finally{ + $zip.Dispose() +} \ No newline at end of file