Skip to content

Commit

Permalink
Fix App Info Version to give correct version number (#164)
Browse files Browse the repository at this point in the history
* Fix App Info Version to give correct version number

* Update version.json

---------

Co-authored-by: Glenn <[email protected]>
  • Loading branch information
ChrisPulman and glennawatson authored Jun 14, 2023
1 parent b5b35e2 commit 5f919f7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
8 changes: 5 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<Platform>AnyCPU</Platform>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<DebugType>embedded</DebugType>
<Authors>Glenn Watson</Authors>
<Copyright>Copyright (c) 2021 ReactiveUI Association Inc</Copyright>
<Authors>Glenn Watson,Chris Pulman</Authors>
<Copyright>Copyright (c) $([System.DateTime]::Now.ToString(yyyy)) ReactiveUI Association Inc</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/reactivemarbles/CacheDatabase</PackageProjectUrl>
<PackageDescription>Allows users to cache values in a local sqlite database.</PackageDescription>
<PackageIcon>logo.png</PackageIcon>
<Owners>glennawatson</Owners>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Owners>glennawatson;chrispulman</Owners>
<PackageTags>system.reactive;propertychanged;inpc;reactive;functional;akavache;cache;database</PackageTags>
<PackageReleaseNotes>https://github.com/reactivemarbles/CacheDatabase/releases</PackageReleaseNotes>
<RepositoryUrl>https://github.com/reactivemarbles/CacheDatabase</RepositoryUrl>
Expand Down Expand Up @@ -44,6 +45,7 @@
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" />
<None Include="$(MSBuildThisFileDirectory)..\images\logo.png" Pack="true" PackagePath="\"/>
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand Down
4 changes: 3 additions & 1 deletion src/ReactiveMarbles.CacheDatabase.Settings/Core/AppInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using ReactiveMarbles.CacheDatabase.Sqlite3;
#endif

using System.Diagnostics;
using System.Reflection;

#if ENCRYPTED
Expand All @@ -34,7 +35,8 @@ static AppInfo()
ExecutingAssemblyName = ExecutingAssembly.FullName!.Split(',')[0];
ApplicationRootPath = Path.Combine(Path.GetDirectoryName(ExecutingAssembly.Location)!, "..");
SettingsCachePath = Path.Combine(ApplicationRootPath, "SettingsCache");
Version = ExecutingAssembly.GetName().Version;
var fileVersionInfo = FileVersionInfo.GetVersionInfo(ExecutingAssembly.Location);
Version = new(fileVersionInfo.ProductMajorPart, fileVersionInfo.ProductMinorPart, fileVersionInfo.ProductBuildPart, fileVersionInfo.ProductPrivatePart);
}

/// <summary>
Expand Down
25 changes: 10 additions & 15 deletions src/ReactiveMarbles.CacheDatabase.Tests/BlobCacheTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ public async Task ArraysShouldBeRoundtrippable()
}
}

Assert.Equal(input.First().Blog, result.First().Blog);
Assert.Equal(input.First().Bio, result.First().Bio);
Assert.Equal(input.First().Name, result.First().Name);
Assert.Equal(input[0].Blog, result[0].Blog);
Assert.Equal(input[0].Bio, result[0].Bio);
Assert.Equal(input[0].Name, result[0].Name);
Assert.Equal(input.Last().Blog, result.Last().Blog);
Assert.Equal(input.Last().Bio, result.Last().Bio);
Assert.Equal(input.Last().Name, result.Last().Name);
Expand Down Expand Up @@ -247,8 +247,8 @@ public async Task ArraysShouldBeRoundtrippableUsingObjectFactory(Type serializer
}
}

Assert.Equal(input.First().Age, result.First().Age);
Assert.Equal(input.First().Name, result.First().Name);
Assert.Equal(input[0].Age, result[0].Age);
Assert.Equal(input[0].Name, result[0].Name);
Assert.Equal(input.Last().Age, result.Last().Age);
Assert.Equal(input.Last().Name, result.Last().Name);
}
Expand Down Expand Up @@ -297,8 +297,7 @@ public async Task FetchFunctionShouldBeCalledOnceForGetOrFetchObject()
/// Makes sure the fetch function debounces current requests.
/// </summary>
[Fact(Skip = "TestScheduler tests aren't gonna work with new SQLite")]
public void FetchFunctionShouldDebounceConcurrentRequests()
{
public void FetchFunctionShouldDebounceConcurrentRequests() =>
new TestScheduler().With(sched =>
{
using (Utility.WithEmptyDirectory(out var path))
Expand Down Expand Up @@ -383,7 +382,6 @@ public void FetchFunctionShouldDebounceConcurrentRequests()
}
}
});
}

/// <summary>
/// Makes sure that the fetch function propogates thrown exceptions.
Expand All @@ -392,10 +390,7 @@ public void FetchFunctionShouldDebounceConcurrentRequests()
[Fact]
public async Task FetchFunctionShouldPropagateThrownExceptionAsObservableException()
{
var fetcher = new Func<IObservable<Tuple<string, string>>>(() =>
{
throw new InvalidOperationException();
});
var fetcher = new Func<IObservable<Tuple<string, string>>>(() => throw new InvalidOperationException());

using (Utility.WithEmptyDirectory(out var path))
await using (var fixture = CreateBlobCache(path))
Expand Down Expand Up @@ -517,12 +512,12 @@ public async Task GetAndFetchLatestCallsFetchPredicate()
{
var fetchPredicateCalled = false;

Func<DateTimeOffset, bool> fetchPredicate = d =>
bool FetchPredicate(DateTimeOffset d)
{
fetchPredicateCalled = true;

return true;
};
}

var fetcher = new Func<IObservable<string>>(() => Observable.Return("baz"));

Expand All @@ -534,7 +529,7 @@ public async Task GetAndFetchLatestCallsFetchPredicate()
{
await fixture.InsertObject("foo", "bar").FirstAsync();

await fixture.GetAndFetchLatest("foo", fetcher, fetchPredicate).LastAsync();
await fixture.GetAndFetchLatest("foo", fetcher, FetchPredicate).LastAsync();

Assert.True(fetchPredicateCalled);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2",
"version": "1.3",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/main$"
Expand Down

0 comments on commit 5f919f7

Please sign in to comment.