have more control over application versioning

pull/9/head
sleevezipper 4 years ago
parent c91dd25353
commit b27d26a287

@ -83,12 +83,21 @@ namespace hass_workstation_service
Identifiers = "hass-workstation-service", Identifiers = "hass-workstation-service",
Manufacturer = Environment.UserName, Manufacturer = Environment.UserName,
Model = Environment.OSVersion.ToString(), Model = Environment.OSVersion.ToString(),
Sw_version = Assembly.GetExecutingAssembly().GetName().Version.ToString() Sw_version = GetVersion()
}; };
services.AddSingleton(deviceConfig); services.AddSingleton(deviceConfig);
services.AddSingleton<ConfigurationService>(); services.AddSingleton<ConfigurationService>();
services.AddSingleton<MqttPublisher>(); services.AddSingleton<MqttPublisher>();
services.AddHostedService<Worker>(); services.AddHostedService<Worker>();
}); });
static internal string GetVersion()
{
if (!Debugger.IsAttached)
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
return "Debug";
}
} }
} }

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ApplicationRevision>11</ApplicationRevision> <ApplicationRevision>14</ApplicationRevision>
<ApplicationVersion>1.0.0.*</ApplicationVersion> <ApplicationVersion>1.0.0.*</ApplicationVersion>
<BootstrapperEnabled>True</BootstrapperEnabled> <BootstrapperEnabled>True</BootstrapperEnabled>
<Configuration>Release</Configuration> <Configuration>Release</Configuration>

@ -12,3 +12,7 @@ It will try to futher accomplish this goal in the future by:
- Being platform independent - Being platform independent
- Being easy to configure - Being easy to configure
- Using secure communication - Using secure communication
## Deployments
1.

@ -5,6 +5,11 @@
<UserSecretsId>dotnet-hass_workstation_service-C65C2EBE-1977-4C24-AC6B-6921877E1390</UserSecretsId> <UserSecretsId>dotnet-hass_workstation_service-C65C2EBE-1977-4C24-AC6B-6921877E1390</UserSecretsId>
<RootNamespace>hass_workstation_service</RootNamespace> <RootNamespace>hass_workstation_service</RootNamespace>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<Authors>Sleevezipper</Authors>
<RepositoryUrl>https://github.com/sleevezipper/hass-workstation-service</RepositoryUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AssemblyVersion>1.0.*</AssemblyVersion>
<Deterministic>false</Deterministic>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

Loading…
Cancel
Save