mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-23 00:38:47 +00:00
[ci skip] ci(upm): output package.json instead of print to stdout
This commit is contained in:
parent
9ecbbee571
commit
34d1f859a7
@ -7,7 +7,8 @@ if (args.Length == 0 || string.IsNullOrWhiteSpace(args[0]))
|
||||
{
|
||||
version = Environment.GetEnvironmentVariable("GITHUB_SHA") ?? "0.0.0";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
string path = args[0];
|
||||
var assembly = Assembly.LoadFrom(path);
|
||||
var attribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||
@ -19,6 +20,7 @@ else
|
||||
{
|
||||
version = attribute.InformationalVersion;
|
||||
}
|
||||
}
|
||||
|
||||
var package = new
|
||||
{
|
||||
@ -33,4 +35,5 @@ var package = new
|
||||
licensesUrl = "https://github.com/oliverbooth/X10D/blob/main/LICENSE.md"
|
||||
};
|
||||
|
||||
Console.WriteLine(JsonSerializer.Serialize(package, new JsonSerializerOptions {WriteIndented = true}));
|
||||
using FileStream outputStream = File.Create("package.json");
|
||||
JsonSerializer.Serialize(outputStream, package, new JsonSerializerOptions {WriteIndented = true});
|
||||
|
Loading…
Reference in New Issue
Block a user