Skip to content

Commit

Permalink
Move AssemblyVersion into common file and specify version bands based…
Browse files Browse the repository at this point in the history
… on netstandard level
  • Loading branch information
Oren Novotny committed Jul 10, 2016
1 parent 40d832b commit 548cd01
Show file tree
Hide file tree
Showing 38 changed files with 143 additions and 33 deletions.
22 changes: 22 additions & 0 deletions Ix.NET/Source/GlobalAssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

using System.Reflection;


#if NETSTANDARD1_0 || WP8
[assembly: AssemblyVersion("3.0.0.0")]
#elif NETSTANDARD1_1 || WINDOWS8 || NET45 || NETCORE45
[assembly: AssemblyVersion("3.0.1000.0")]
#elif NETSTANDARD1_2 || WINDOWS81 || NET451 || NETCORE451 || WPA81
[assembly: AssemblyVersion("3.0.2000.0")]
#elif NETSTANDARD1_3 || NET46
[assembly: AssemblyVersion("3.0.3000.0")]
#elif NETSTANDARD1_4 || UAP10_0 || NETCORE50 || NET461
[assembly: AssemblyVersion("3.0.4000.0")]
#elif NETSTANDARD1_5 || NET462
[assembly: AssemblyVersion("3.0.5000.0")]
#elif NETSTANDARD1_6 || NETCOREAPP1_0 || NET463
[assembly: AssemblyVersion("3.0.6000.0")]
#else // this is here to prevent the build system from complaining. It should never be hit
[assembly: AssemblyVersion("invalid")]
#endif

3 changes: 2 additions & 1 deletion Ix.NET/Source/Ix.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "System.Interactive.Tests",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B733D97A-F1ED-4FC3-BF8E-9AC47A89DE96}"
ProjectSection(SolutionItems) = preProject
build-new.ps1 = build-new.ps1
GlobalAssemblyVersion.cs = GlobalAssemblyVersion.cs
build-new.ps1 = build-new.ps1
global.json = global.json
NuGet.Config = NuGet.Config
EndProjectSection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
3 changes: 3 additions & 0 deletions Ix.NET/Source/System.Interactive.Async.Providers/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Interactive.Async.Providers.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
3 changes: 3 additions & 0 deletions Ix.NET/Source/System.Interactive.Async/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Interactive.Async.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
3 changes: 3 additions & 0 deletions Ix.NET/Source/System.Interactive.Providers/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Interactive.Providers.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
2 changes: 0 additions & 2 deletions Ix.NET/Source/System.Interactive/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]

3 changes: 3 additions & 0 deletions Ix.NET/Source/System.Interactive/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Interactive.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
4 changes: 2 additions & 2 deletions Ix.NET/Source/build-new.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ $msbuild = Get-ItemProperty "hklm:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
$msbuildExe = Join-Path $msbuild.MSBuildToolsPath "msbuild.exe"

# get tools
.\nuget.exe install -excludeversion -pre gitversion.commandline -outputdirectory packages
.\nuget.exe install -excludeversion -pre gitversion.commandline -Version 3.5.5-pullrequest0921 -outputdirectory packages

#update version
.\packages\gitversion.commandline\tools\gitversion.exe /l console /output buildserver /updateassemblyinfo
.\packages\gitversion.commandline\tools\gitversion.exe /l console /output buildserver /updateassemblyinfo /excludeUpdateAssemblyVersion

$versionObj = .\packages\gitversion.commandline\tools\gitversion.exe | ConvertFrom-Json

Expand Down
22 changes: 22 additions & 0 deletions Rx.NET/Source/GlobalAssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

using System.Reflection;


#if NETSTANDARD1_0 || WP8
[assembly: AssemblyVersion("3.0.0.0")]
#elif NETSTANDARD1_1 || WINDOWS8 || NET45 || NETCORE45
[assembly: AssemblyVersion("3.0.1000.0")]
#elif NETSTANDARD1_2 || WINDOWS81 || NET451 || NETCORE451 || WPA81
[assembly: AssemblyVersion("3.0.2000.0")]
#elif NETSTANDARD1_3 || NET46
[assembly: AssemblyVersion("3.0.3000.0")]
#elif NETSTANDARD1_4 || UAP10_0 || NETCORE50 || NET461
[assembly: AssemblyVersion("3.0.4000.0")]
#elif NETSTANDARD1_5 || NET462
[assembly: AssemblyVersion("3.0.5000.0")]
#elif NETSTANDARD1_6 || NETCOREAPP1_0 || NET463
[assembly: AssemblyVersion("3.0.6000.0")]
#else // this is here to prevent the build system from complaining. It should never be hit
[assembly: AssemblyVersion("invalid")]
#endif

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
5 changes: 4 additions & 1 deletion Rx.NET/Source/Microsoft.Reactive.Testing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"keyFile": "../ReactiveX.snk",
"define": [ "SIGNED" ],
"nowarn": [ "CS1591" ],
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion Rx.NET/Source/Rx.NET.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25402.0
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "System.Reactive.Core", "System.Reactive.Core\System.Reactive.Core.xproj", "{FDA62C35-4174-44B0-BEBE-61E80B2515BA}"
EndProject
Expand Down Expand Up @@ -38,6 +38,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
build-new.ps1 = build-new.ps1
global.json = global.json
GlobalAssemblyVersion.cs = GlobalAssemblyVersion.cs
NuGet.Config = NuGet.Config
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
3 changes: 3 additions & 0 deletions Rx.NET/Source/System.Reactive.Core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Reactive.Core.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
3 changes: 3 additions & 0 deletions Rx.NET/Source/System.Reactive.Experimental/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Reactive.Experimental.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
5 changes: 4 additions & 1 deletion Rx.NET/Source/System.Reactive.Interfaces/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"keyFile": "../ReactiveX.snk",
"define": [ "SIGNED" ],
"nowarn": [ "CS1591" ],
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]

3 changes: 2 additions & 1 deletion Rx.NET/Source/System.Reactive.Linq/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"Reactive/Observer.Extensions.cs",
"Reactive/Internal/Observers.cs",
"Reactive/Internal/Producer.cs"
]
],
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
},
"embed": {
"includeFiles": "Properties/System.Reactive.Linq.rd.xml"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using System.Security;

[assembly: AssemblyTitle("System.Reactive.Observable.Aliases")]
// Notice: same description as in the .nuspec files; see Source/Rx/Setup/NuGet
[assembly: AssemblyDescription("Reactive Extensions provides the aliases Map, FlatMap, and Filter.")]
#if DEBUG
[assembly: AssemblyConfiguration("Debug")]
#else
[assembly: AssemblyConfiguration("Retail")]
#endif
[assembly: AssemblyCompany(".NET Foundation and Contributors.")]
[assembly: AssemblyProduct("Reactive Extensions")]
[assembly: AssemblyCopyright("\x00a9 .NET Foundation and Contributors. All rights reserved.")]
[assembly: NeutralResourcesLanguage("en-US")]

#if !PLIB
[assembly: ComVisible(false)]
#endif

[assembly: CLSCompliant(true)]

#if HAS_APTCA && NO_CODECOVERAGE
[assembly: AllowPartiallyTrustedCallers]
#endif

// ===========================================================================
// DO NOT EDIT OR REMOVE ANYTHING BELOW THIS COMMENT.
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"keyFile": "../ReactiveX.snk",
"define": [ "SIGNED" ],
"nowarn": [ "CS1591" ],
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
3 changes: 2 additions & 1 deletion Rx.NET/Source/System.Reactive.PlatformServices/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"nowarn": [ "CS1591" ],
"xmlDoc": true,
"compile": {
"exclude": [ "Strings_PlatformServices.Designer.cs" ]
"exclude": [ "Strings_PlatformServices.Designer.cs" ],
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
},
"embed": {
"includeFiles": "Properties/System.Reactive.PlatformServices.rd.xml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
3 changes: 3 additions & 0 deletions Rx.NET/Source/System.Reactive.Providers/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Reactive.Providers.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
3 changes: 3 additions & 0 deletions Rx.NET/Source/System.Reactive.Runtime.Remoting/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"xmlDoc": true,
"embed": {
"includeFiles": "Properties/System.Reactive.Runtime.Remoting.rd.xml"
},
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
5 changes: 4 additions & 1 deletion Rx.NET/Source/System.Reactive.Windows.Forms/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"keyFile": "../ReactiveX.snk",
"define": [ "SIGNED" ],
"nowarn": [ "CS1591" ],
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
5 changes: 4 additions & 1 deletion Rx.NET/Source/System.Reactive.Windows.Threading/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"keyFile": "../ReactiveX.snk",
"define": [ "SIGNED" ],
"nowarn": [ "CS1591" ],
"xmlDoc": true
"xmlDoc": true,
"compile": {
"includeFiles": [ "../GlobalAssemblyVersion.cs" ]
}
},

"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@
// Version numbers are automatically generated in the msbuild files based on regular expressions
// ===========================================================================

[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
[assembly: AssemblyInformationalVersion("2.2.0.0")]
Loading

0 comments on commit 548cd01

Please sign in to comment.