Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(upm): update package.json in upm branch (#69)
- Loading branch information
1 parent
7a119fc
commit 9ecbbee
Showing
6 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Text.Json; | ||
|
||
string version; | ||
|
||
if (args.Length == 0 || string.IsNullOrWhiteSpace(args[0])) | ||
{ | ||
version = Environment.GetEnvironmentVariable("GITHUB_SHA") ?? "0.0.0"; | ||
} | ||
|
||
string path = args[0]; | ||
var assembly = Assembly.LoadFrom(path); | ||
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>(); | ||
if (attribute is null || string.IsNullOrWhiteSpace(attribute.InformationalVersion)) | ||
{ | ||
version = Environment.GetEnvironmentVariable("GITHUB_SHA") ?? "0.0.0"; | ||
} | ||
else | ||
{ | ||
version = attribute.InformationalVersion; | ||
} | ||
|
||
var package = new | ||
{ | ||
name = "me.olivr.x10d", | ||
author = new {name = "Oliver Booth", email = "me@olivr.me", url = "https://oliverbooth.dev"}, | ||
displayName = "X10D", | ||
version, | ||
unity = "2021.3", | ||
description = "Extension methods on crack", | ||
keywords = new[] {"dotnet", "extension-methods"}, | ||
changelogUrl = "https://github.com/oliverbooth/X10D/blob/main/CHANGELOG.md", | ||
licensesUrl = "https://github.com/oliverbooth/X10D/blob/main/LICENSE.md" | ||
}; | ||
|
||
Console.WriteLine(JsonSerializer.Serialize(package, new JsonSerializerOptions {WriteIndented = true})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters