Skip to content

Commit

Permalink
versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
b1f6c1c4 committed Sep 6, 2022
1 parent 6cf4222 commit 8180177
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 16 deletions.
6 changes: 6 additions & 0 deletions AccountingServer.BLL/AccountingServer.BLL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>unknown</VersionSuffix>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0+unknown</InformationalVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions AccountingServer.DAL/AccountingServer.DAL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>unknown</VersionSuffix>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0+unknown</InformationalVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions AccountingServer.Entities/AccountingServer.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>unknown</VersionSuffix>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0+unknown</InformationalVersion>
</PropertyGroup>

</Project>
5 changes: 4 additions & 1 deletion AccountingServer.Entities/Util/ConfigManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ public static async IAsyncEnumerable<string> ReloadAll()
ConfigStreamsMap.Clear();
foreach (var (m, t) in fns.Select(static fn => (fn, DefaultLoader(fn))).ToList())
{
await t;
ConfigStreamsMap[m] = await t;
yield return $"Loaded config file {m}\n";
}

foreach (var (t, m) in ConfigsMap)
yield return $"{m} is bound to {t.FullName}";
}
finally
{
Expand Down
6 changes: 6 additions & 0 deletions AccountingServer.Shell/AccountingServer.Shell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>unknown</VersionSuffix>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0+unknown</InformationalVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
9 changes: 7 additions & 2 deletions AccountingServer.Shell/Facade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using AccountingServer.BLL;
using AccountingServer.BLL.Util;
Expand Down Expand Up @@ -181,8 +182,12 @@ private static IEnumerable<string> ListTitles()
/// </summary>
/// <returns>帮助内容</returns>
private static IEnumerable<string> ListVersions()
=> AppDomain.CurrentDomain.GetAssemblies().Select(static asm => asm.GetName())
.Select(static nm => $"{nm.Name}@{nm.Version}\n").OrderBy(static s => s);
=> AppDomain.CurrentDomain.GetAssemblies().Select(static asm =>
{
var nm = asm.GetName();
var iv = asm.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
return $"{nm.Name}@{nm.Version}@{iv}\n";
}).OrderBy(static s => s);

#endregion

Expand Down
11 changes: 9 additions & 2 deletions AccountingServer/AccountingServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<OutputType>Exe</OutputType>
<RootNamespace />
<VersionPrefix>1.0.0.0</VersionPrefix>
<VersionSuffix>unknown</VersionSuffix>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<InformationalVersion>1.0.0+unknown</InformationalVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AccountingServer.Entities\AccountingServer.Entities.csproj"/>
<ProjectReference Include="..\AccountingServer.Shell\AccountingServer.Shell.csproj"/>
<ProjectReference Include="..\AccountingServer.Entities\AccountingServer.Entities.csproj" />
<ProjectReference Include="..\AccountingServer.Shell\AccountingServer.Shell.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.0.{build}
version: 1.0.0.{build}

branches:
only:
Expand Down Expand Up @@ -44,21 +44,21 @@ install:
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
version_prefix: 1.0.0.$(APPVEYOR_BUILD_NUMBER)
package_version: 1.0.0
assembly_version: 1.0.0.$(APPVEYOR_BUILD_NUMBER)
file_version: $(APPVEYOR_BUILD_VERSION).$(APPVEYOR_BUILD_NUMBER)
informational_version: $(APPVEYOR_REPO_COMMIT)

build_script:
- cd nginx && npm run build
- msbuild /p:Configuration=Gen /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.QueryGeneration/AccountingServer.QueryGeneration.csproj
- ps: ./DeployParser.ps1
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.Entities\AccountingServer.Entities.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.DAL\AccountingServer.DAL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.BLL\AccountingServer.BLL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.Shell\AccountingServer.Shell.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer\AccountingServer.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.Entities\AccountingServer.Entities.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.DAL\AccountingServer.DAL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.BLL\AccountingServer.BLL.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer.Shell\AccountingServer.Shell.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:VersionSuffix=$(APPVEYOR_BUILD_ID) AccountingServer\AccountingServer.csproj
- msbuild /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" AccountingServer.Test\AccountingServer.Test.csproj

# test_script:
Expand Down

0 comments on commit 8180177

Please sign in to comment.