From df74925e8bf513c8c5b19f9b62238566340c0a98 Mon Sep 17 00:00:00 2001 From: Stefan Jandl Date: Tue, 30 Nov 2021 12:07:50 +0100 Subject: [PATCH] fix: Release packaging (#438) * packaging cleanup * removed whitespace * cleanup --- package/Editor.meta | 8 -------- package/README.md.meta | 7 ------- package/Runtime.meta | 8 -------- package/package.json.meta | 7 ------- scripts/pack.ps1 | 32 ++++++++++++++++++-------------- 5 files changed, 18 insertions(+), 44 deletions(-) delete mode 100644 package/Editor.meta delete mode 100644 package/README.md.meta delete mode 100644 package/Runtime.meta delete mode 100644 package/package.json.meta 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..56d338f44 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -1,24 +1,28 @@ 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