Skip to content

Commit

Permalink
Merge pull request #24 from VeyronSakai/package-exporter
Browse files Browse the repository at this point in the history
Add PackageExporter
  • Loading branch information
VeyronSakai authored Apr 27, 2024
2 parents 0325dff + 7654e32 commit e06eb11
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ dotnet_naming_symbols.all_members.applicable_kinds = *

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

file_header_template = Copyright (c) 2020-${CurrentDate.Year} VeyronSakai.\nThis software is released under the MIT License.
file_header_template = Copyright (c) ${CurrentDate.Year} VeyronSakai.\nThis software is released under the MIT License.

# RS0016: Only enable if API files are present
dotnet_public_api_analyzer.require_api_files = true
Expand Down
3 changes: 3 additions & 0 deletions Assets/Editor/BuildEntryPoint.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using UnityEditor;

namespace Editor
Expand Down
27 changes: 27 additions & 0 deletions Assets/Editor/PackageExporter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using System.Linq;
using UnityEditor;

namespace Editor
{
public class PackageExporter
{
private const string PackagePath = "Assets/GhaUnityBuildReporter/";
private const string ExportPath = "./GhaUnityBuildReporter.unitypackage";

[MenuItem("Tools/ExportPackage")]
private static void Export()
{
var assetPathNames = AssetDatabase.FindAssets("", new[] { PackagePath })
.Select(AssetDatabase.GUIDToAssetPath)
.ToArray();

AssetDatabase.ExportPackage(
assetPathNames,
ExportPath,
ExportPackageOptions.IncludeDependencies);
}
}
}
3 changes: 3 additions & 0 deletions Assets/Editor/PackageExporter.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using UnityEditor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using System.IO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

namespace GhaUnityBuildReporter.Editor
Expand Down
2 changes: 1 addition & 1 deletion Assets/GhaUnityBuildReporter/Editor/Preprocessor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using UnityEditor.Build;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2024 VeyronSakai.
// Copyright (c) 2024 VeyronSakai.
// This software is released under the MIT License.

using System;
Expand Down

0 comments on commit e06eb11

Please sign in to comment.