Skip to content

Commit

Permalink
Merge pull request #15 from davewalker5/FR-22-Aircraft-Age-Export-Bug
Browse files Browse the repository at this point in the history
Fixup check for missing year of manufacture during export
  • Loading branch information
davewalker5 committed Aug 8, 2023
2 parents ee295dc + 23fe444 commit 2814940
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/FlightRecorder.Entities/Db/Sighting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public FlattenedSighting Flatten()
SerialNumber = Aircraft.SerialNumber,
Manufacturer = Aircraft.Model.Manufacturer.Name,
Model = Aircraft.Model.Name,
Age = (Aircraft.Manufactured != null) ? (DateTime.Now.Year - Aircraft.Manufactured).ToString() : "",
Age = (Aircraft.Manufactured > 0) ? (DateTime.Now.Year - Aircraft.Manufactured).ToString() : "",
Embarkation = Flight.Embarkation,
Destination = Flight.Destination,
Altitude = Altitude,
Expand Down
4 changes: 2 additions & 2 deletions src/FlightRecorder.Entities/FlightRecorder.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PackageId>FlightRecorder.Entities</PackageId>
<PackageVersion>1.0.5.0</PackageVersion>
<PackageVersion>1.0.6.0</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) Dave Walker 2020, 2021, 2022</Copyright>
<Owners>Dave Walker</Owners>
Expand All @@ -16,7 +16,7 @@
<PackageProjectUrl>https://github.com/davewalker5/FlightRecorderDb</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<ReleaseVersion>1.0.5.0</ReleaseVersion>
<ReleaseVersion>1.0.6.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/FlightRecorder.Manager/FlightRecorder.Manager.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ReleaseVersion>1.0.5.0</ReleaseVersion>
<ReleaseVersion>1.0.6.0</ReleaseVersion>
<FileVersion>1.0.6.0</FileVersion>
<ProductVersion>1.0.6</ProductVersion>
<Configurations>Release;Debug</Configurations>
</PropertyGroup>

Expand Down
7 changes: 5 additions & 2 deletions src/FlightRecorder.Manager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
using FlightRecorder.Manager.Entities;
using FlightRecorder.Manager.Logic;
using FlightRecorder.DataExchange;
using System.Diagnostics;
using System.Reflection;

namespace FlightRecorder.Manager
{
static class Program
{
static void Main(string[] args)
{
string version = typeof(Program).Assembly.GetName().Version.ToString();
Console.WriteLine($"Flight Recorder Database Management {version}");
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo info = FileVersionInfo.GetVersionInfo(assembly.Location);
Console.WriteLine($"Flight Recorder Database Management {info.FileVersion}");

Operation op = new CommandParser().ParseCommandLine(args);
if (op.Valid)
Expand Down
2 changes: 1 addition & 1 deletion src/FlightRecorder.Manager/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"FlightRecorder.Manager": {
"commandName": "Project",
"commandLineArgs": "update"
"commandLineArgs": "export sightings test_export.csv"
}
}
}

0 comments on commit 2814940

Please sign in to comment.