Skip to content

Commit

Permalink
No longer self-contained (still single file), hopefully fix single fi…
Browse files Browse the repository at this point in the history
…le publish version info, update version number to 0.2.1
  • Loading branch information
TraceEntertains committed Sep 1, 2024
1 parent 89b91c0 commit 738264e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions tns2tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class Program
{
public static byte VersionMajor;
public static byte VersionMinor;
public static byte VersionRevision;
public static string InformationalVersion;

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (macOS-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (ubuntu-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Debug)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 16 in tns2tool/Program.cs

View workflow job for this annotation

GitHub Actions / Build (windows-latest, Release)

Non-nullable field 'InformationalVersion' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

public static string GetFileVersion()
Expand All @@ -21,11 +22,13 @@ public static string GetFileVersion()

static void PopulateVersionInfo()
{
Assembly assembly = Assembly.GetEntryAssembly()!;
Version version = assembly.GetName().Version!;
Version version = Assembly.GetEntryAssembly()!.GetName().Version!;
VersionMajor = (byte)version.Major;
VersionMinor = (byte)version.Minor;
InformationalVersion = FileVersionInfo.GetVersionInfo(assembly.Location).ProductVersion!;
VersionRevision = (byte)version.Revision;

InformationalVersion =
FileVersionInfo.GetVersionInfo(Environment.ProcessPath!).ProductVersion!;
}

static void Main(string[] args)
Expand Down
3 changes: 2 additions & 1 deletion tns2tool/tns2tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<PropertyGroup>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>false</SelfContained>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.2</Version>
<Version>0.2.1</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Configurations>Debug;Release;FullRelease</Configurations>
<RuntimeIdentifiers>win-x64;osx-x64;linux-x64</RuntimeIdentifiers>
Expand Down

0 comments on commit 738264e

Please sign in to comment.