Skip to content

Commit 9ca6d3c

Browse files
committed
Add app versioning
1 parent 696bdc1 commit 9ca6d3c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

InfiniWindows/DeviceManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private async Task<BluetoothLEDevice> FindDeviceAsync()
2727
if (device == null)
2828
continue;
2929

30-
Console.WriteLine($"Device found! {device.Name} {device.Id}");
30+
Console.WriteLine($"Device found! Name: {device.Name} ID: {device.Id}");
3131

3232
if (await OpenDevice(device.Name) != 0)
3333
{
@@ -110,7 +110,7 @@ async Task<int> OpenDevice(string deviceName)
110110

111111
_selectedDevice = await BluetoothLEDevice.FromIdAsync(foundId).AsTask().TimeoutAfter(_timeout);
112112
if (!Console.IsInputRedirected)
113-
Console.WriteLine($"Connecting to {_selectedDevice.Name}.");
113+
Console.WriteLine($"Connecting to {_selectedDevice.Name} ...");
114114
}
115115
catch
116116
{

InfiniWindows/InfiniWindows.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
6+
<Version>0.1.0-alpha</Version>
7+
<PublishSingleFile>true</PublishSingleFile>
8+
<SelfContained>true</SelfContained>
9+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
10+
<PublishReadyToRun>true</PublishReadyToRun>
611
<ImplicitUsings>enable</ImplicitUsings>
712
<Nullable>enable</Nullable>
813
</PropertyGroup>

InfiniWindows/Program.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Windows.Devices.Enumeration;
1+
using System.Reflection;
2+
using Windows.Devices.Enumeration;
23
using InfiniWindows;
34

45
class Program
@@ -17,7 +18,13 @@ private static async Task Main(string[] args)
1718
// Start endless BLE device watcher
1819
var watcher = CreateDeviceWatcher();
1920

21+
var version = Assembly.GetEntryAssembly()
22+
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()
23+
.InformationalVersion;
24+
25+
Console.WriteLine($"InfiniWindows v{version}");
2026
Console.WriteLine("Scanning for InfiniTime device...");
27+
2128
var deviceManager = new DeviceManager();
2229
while (await deviceManager.FindDeviceAsync(_deviceList) == null)
2330
{

0 commit comments

Comments
 (0)