Skip to content

Commit 454fa9a

Browse files
authored
Sign assembly with the old key (#471)
* Restore old signing key * Build Strong Named Assembly * Make assembly version major.minor Fixes #450 +semver:breaking
1 parent fecbea6 commit 454fa9a

File tree

8 files changed

+21
-15
lines changed

8 files changed

+21
-15
lines changed

GitVersion.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
assembly-versioning-scheme: MajorMinor
12
branches:
23
master:
34
mode: ContinuousDelivery

build.cake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Setup((context) =>
2121

2222
Information("FluentNHibernate");
2323
Information($"SemVersion: {parameters.Version.SemVersion}");
24+
Information($"AssemblyVersion: {parameters.Version.AssemblyVersion}");
25+
Information($"Version: {parameters.Version.Version}");
2426
Information($"IsLocalBuild: {parameters.IsLocalBuild}");
2527
Information($"IsTagged: {parameters.IsTagged}");
2628
Information($"IsPullRequest: {parameters.IsPullRequest}");
@@ -31,8 +33,9 @@ Setup((context) =>
3133

3234
msBuildSettings = new DotNetCoreMSBuildSettings()
3335
.WithProperty("Version", parameters.Version.SemVersion)
34-
.WithProperty("AssemblyVersion", parameters.Version.Version)
36+
.WithProperty("AssemblyVersion", parameters.Version.AssemblyVersion)
3537
.WithProperty("FileVersion", parameters.Version.Version)
38+
.WithProperty("InformationalVersion", parameters.Version.InformationalVersion)
3639
.WithProperty("PackageReleaseNotes", string.Concat("\"", releaseNotes, "\""));
3740
});
3841

build/version.cake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ public class BuildVersion
55
public string DotNetAsterix { get; private set; }
66
public string Milestone { get; private set; }
77
public string AppVersion { get; private set; }
8+
public string AssemblyVersion { get; private set; }
9+
public string InformationalVersion {get; private set; }
810

911
public static BuildVersion Calculate(ICakeContext context, BuildParameters parameters)
1012
{
@@ -15,6 +17,8 @@ public class BuildVersion
1517

1618
string version = null;
1719
string semVersion = null;
20+
string assemblyVersion = null;
21+
string informationalVersion = null;
1822
string milestone = null;
1923

2024
if (context.IsRunningOnWindows())
@@ -29,6 +33,8 @@ public class BuildVersion
2933

3034
version = context.EnvironmentVariable("GitVersion_MajorMinorPatch");
3135
semVersion = context.EnvironmentVariable("GitVersion_LegacySemVerPadded");
36+
assemblyVersion = context.EnvironmentVariable("GitVersion_AssemblySemVer");
37+
informationalVersion = context.EnvironmentVariable("GitVersion_InformationalVersion");
3238
milestone = string.Concat("v", version);
3339
}
3440

@@ -39,6 +45,8 @@ public class BuildVersion
3945

4046
version = assertedVersions.MajorMinorPatch;
4147
semVersion = assertedVersions.LegacySemVerPadded;
48+
assemblyVersion = assertedVersions.AssemblySemVer;
49+
informationalVersion = assertedVersions.InformationalVersion;
4250
milestone = string.Concat("v", version);
4351

4452
context.Information("Calculated Semantic Version: {0}", semVersion);
@@ -52,7 +60,9 @@ public class BuildVersion
5260
SemVersion = semVersion,
5361
DotNetAsterix = semVersion.Substring(version.Length).TrimStart('-'),
5462
Milestone = milestone,
55-
AppVersion = appVersion
63+
AppVersion = appVersion,
64+
AssemblyVersion = assemblyVersion,
65+
InformationalVersion = informationalVersion,
5666
};
5767
}
5868
}

src/FluentKey.snk

596 Bytes
Binary file not shown.

src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
</ItemGroup>
3535

3636
<ItemGroup>
37-
<None Include="..\FluentKey.snk">
38-
<Link>FluentKey.snk</Link>
39-
</None>
4037
<None Include="App.config" />
4138
<Content Include="Cfg\hibernate.cfg.xml" />
4239
</ItemGroup>

src/FluentNHibernate.Testing/Visitors/RelationshipPairingVisitorSpec.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public override void establish_context()
2121
manyToOneARankedFirstToHolder.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(Holder)));
2222
manyToOneARankedFirstToHolder.Set(x => x.Name, Layer.Defaults, "ARankedFirstProperty");
2323
manyToOneARankedFirstToHolder.ContainingEntityType = typeof(ARankedFirst);
24-
manyToOneARankedFirstToHolder.Member = new PropertyMember(typeof(ARankedFirst).GetProperty("ARankedFirstProperty"));
24+
manyToOneARankedFirstToHolder.Member = typeof(ARankedFirst).GetProperty("ARankedFirstProperty").ToMember();
2525

2626
manyToOneBRankedSecondToHolder = new ManyToOneMapping();
2727
manyToOneBRankedSecondToHolder.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(Holder)));
2828
manyToOneBRankedSecondToHolder.Set(x => x.Name, Layer.Defaults, "BRankedSecondProperty");
2929
manyToOneBRankedSecondToHolder.ContainingEntityType = typeof(BRankedSecond);
30-
manyToOneBRankedSecondToHolder.Member = new PropertyMember(typeof(BRankedSecond).GetProperty("BRankedSecondProperty"));
30+
manyToOneBRankedSecondToHolder.Member = typeof(BRankedSecond).GetProperty("BRankedSecondProperty").ToMember();
3131

3232
var relationship = new OneToManyMapping();
3333
relationship.Set(x => x.Class, Layer.Defaults, new TypeReference(typeof(BRankedSecond)));

src/FluentNHibernate/FluentNHibernate.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@
77
<OutputType>Library</OutputType>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
10+
<SignAssembly>true</SignAssembly>
11+
<AssemblyOriginatorKeyFile>../FluentKey.snk</AssemblyOriginatorKeyFile>
1012
</PropertyGroup>
1113

12-
<PropertyGroup>
13-
<Description>FluentNHibernate</Description>
14-
</PropertyGroup>
15-
16-
1714
<PropertyGroup>
1815
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
1916
</PropertyGroup>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using System;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

54
[assembly: ComVisible(false)]
6-
[assembly: CLSCompliant(true)]
7-
[assembly: InternalsVisibleTo("FluentNHibernate.Testing")]
5+
[assembly: CLSCompliant(true)]

0 commit comments

Comments
 (0)