22{
33 using System ;
44 using System . Collections . Generic ;
5+ using GitVersion . Configuration ;
56
67 public static class VariableProvider
78 {
@@ -18,6 +19,7 @@ public static class VariableProvider
1819 public const string LegacySemVerPadded = "LegacySemVerPadded" ;
1920 public const string FullSemVer = "FullSemVer" ;
2021 public const string AssemblySemVer = "AssemblySemVer" ;
22+ public const string AssemblyFileSemVer = "AssemblyFileSemVer" ;
2123 public const string ClassicVersion = "ClassicVersion" ;
2224 public const string ClassicVersionWithTag = "ClassicVersionWithTag" ;
2325 public const string PreReleaseTag = "PreReleaseTag" ;
@@ -30,8 +32,7 @@ public static class VariableProvider
3032 public const string NuGetVersionV3 = "NuGetVersionV3" ;
3133 public const string NuGetVersion = "NuGetVersion" ;
3234
33- public static Dictionary < string , string > GetVariablesFor (
34- SemanticVersion semanticVersion )
35+ public static Dictionary < string , string > GetVariablesFor ( SemanticVersion semanticVersion , Config configuration )
3536 {
3637 var bmd = semanticVersion . BuildMetaData ;
3738 var formatter = bmd . Branch == "develop" ? new CiFeedFormatter ( ) : null ;
@@ -49,7 +50,8 @@ public static Dictionary<string, string> GetVariablesFor(
4950 { SemVer , semanticVersion . ToString ( null , formatter ) } ,
5051 { LegacySemVer , semanticVersion . ToString ( "l" , formatter ) } ,
5152 { LegacySemVerPadded , semanticVersion . ToString ( "lp" , formatter ) } ,
52- { AssemblySemVer , semanticVersion . ToString ( "j" ) + ".0" } ,
53+ { AssemblySemVer , semanticVersion . GetAssemblyVersion ( configuration . AssemblyVersioningScheme ) } ,
54+ { AssemblyFileSemVer , semanticVersion . GetAssemblyFileVersion ( configuration . AssemblyVersioningScheme ) } ,
5355 { FullSemVer , semanticVersion . ToString ( "f" , formatter ) } ,
5456 { InformationalVersion , semanticVersion . ToString ( "i" , formatter ) } ,
5557 { ClassicVersion , string . Format ( "{0}.{1}" , semanticVersion . ToString ( "j" ) , ( bmd . CommitsSinceTag ?? 0 ) ) } ,
0 commit comments