Skip to content

Commit

Permalink
impl reactiveui-events nuget package creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ghuntley committed Mar 27, 2016
1 parent 82f5c7c commit 6b7b9ae
Show file tree
Hide file tree
Showing 45 changed files with 171 additions and 125 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Expand Up @@ -140,7 +140,7 @@ publish/
# Publish Web Output # Publish Web Output
*.[Pp]ublish.xml *.[Pp]ublish.xml
*.azurePubxml *.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings # TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted # but database connection strings (with potential passwords) will be unencrypted
*.pubxml *.pubxml
*.publishproj *.publishproj
Expand Down Expand Up @@ -235,5 +235,7 @@ _Pvt_Extensions
# Tools # Tools
tools/ tools/


ReactiveUI.Events/Events.cs # ReactiveUI
ReactiveUI.Events/Events_*.cs artifacts/
src/CommonAssemblyInfo.cs
src/ReactiveUI.Events/Events_*.cs
50 changes: 0 additions & 50 deletions COPYING

This file was deleted.

55 changes: 55 additions & 0 deletions LICENSE
@@ -0,0 +1,55 @@
Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software,
you accept this license. If you do not accept the license, do not use the
software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution"
have the same meaning here as under U.S. copyright law. A "contribution" is the
original software, or any additions or changes to the software. A "contributor"
is any person that distributes its contribution under this license. "Licensed
patents" are a contributor's patent claims that read directly on its
contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license
conditions and limitations in section 3, each contributor grants you a
non-exclusive, worldwide, royalty-free copyright license to reproduce its
contribution, prepare derivative works of its contribution, and distribute its
contribution or any derivative works that you create.

(B) Patent Grant- Subject
to the terms of this license, including the license conditions and limitations
in section 3, each contributor grants you a non-exclusive, worldwide,
royalty-free license under its licensed patents to make, have made, use, sell,
offer for sale, import, and/or otherwise dispose of its contribution in the
software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any
contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you
claim are infringed by the software, your patent license from such contributor
to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all
copyright, patent, trademark, and attribution notices that are present in the
software.

(D) If you distribute any portion of the software in source code form, you may
do so only under this license by including a complete copy of this license with
your distribution. If you distribute any portion of the software in compiled or
object code form, you may only do so under a license that complies with this
license.

(E) The software is licensed "as-is." You bear the risk of using it. The
contributors give no express warranties, guarantees or conditions. You may have
additional consumer rights under your local laws which this license cannot
change. To the extent permitted under your local laws, the contributors exclude
the implied warranties of merchantability, fitness for a particular purpose and
non-infringement.
25 changes: 0 additions & 25 deletions NuGet/ReactiveUI-Events/ReactiveUI-Events.nuspec

This file was deleted.

Empty file.
Empty file.
9 changes: 0 additions & 9 deletions ReactiveUI.Events/packages.ReactiveUI.Events_XamForms.config

This file was deleted.

26 changes: 20 additions & 6 deletions build.cake
Expand Up @@ -32,11 +32,26 @@ var version = releaseNotes.Version.ToString();
var semVersion = local ? version : (version + string.Concat("-sha-", gitSha)); var semVersion = local ? version : (version + string.Concat("-sha-", gitSha));


// Define directories. // Define directories.

var artifactDirectory = "./artifacts/";


// Define global marcos. // Define global marcos.
Action Abort = () => { throw new Exception("a non-recoverable fatal error occurred."); }; Action Abort = () => { throw new Exception("a non-recoverable fatal error occurred."); };


Action<string, string> Package = (nuspec, basePath) =>
{
CreateDirectory(artifactDirectory);
Information("Packaging {0} using {1} as the BasePath.", nuspec, basePath);
NuGetPack(nuspec, new NuGetPackSettings {
Verbosity = NuGetVerbosity.Detailed,
OutputDirectory = artifactDirectory,
Version = version,
BasePath = basePath,
});
};


/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// SETUP / TEARDOWN // SETUP / TEARDOWN
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -116,7 +131,7 @@ Task ("GenerateEvents")
Abort(); Abort();
} }
var directory = "ReactiveUI.Events/"; var directory = "src/ReactiveUI.Events/";
var filename = String.Format("Events_{0}.cs", platform); var filename = String.Format("Events_{0}.cs", platform);
var output = System.IO.Path.Combine(directory, filename); var output = System.IO.Path.Combine(directory, filename);
Expand Down Expand Up @@ -156,7 +171,7 @@ Task ("BuildEvents")
// remove the .SetMSBuildPlatform method and simply the invoking methods. // remove the .SetMSBuildPlatform method and simply the invoking methods.
Action<string, MSBuildPlatform> build = (filename, platform) => Action<string, MSBuildPlatform> build = (filename, platform) =>
{ {
var solution = System.IO.Path.Combine("./ReactiveUI.Events", filename); var solution = System.IO.Path.Combine("./src/ReactiveUI.Events/", filename);
// UWP (project.json) needs to be restored before it will build. // UWP (project.json) needs to be restored before it will build.
NuGetRestore (solution); NuGetRestore (solution);
Expand Down Expand Up @@ -188,18 +203,17 @@ Task ("BuildEvents")
} }
}); });



Task ("PackageEvents") Task ("PackageEvents")
.IsDependentOn("BuildEvents") .IsDependentOn("BuildEvents")
.Does (() => .Does (() =>
{ {
Package("./src/ReactiveUI-Events.nuspec", "./src/ReactiveUI.Events");
}); });


Task ("UpdateAssemblyInfo") Task ("UpdateAssemblyInfo")
.Does (() => .Does (() =>
{ {
var file = "./CommonAssemblyInfo.cs"; var file = "./src/CommonAssemblyInfo.cs";
CreateAssemblyInfo(file, new AssemblyInfoSettings { CreateAssemblyInfo(file, new AssemblyInfoSettings {
Product = "ReactiveUI", Product = "ReactiveUI",
Expand Down
8 changes: 4 additions & 4 deletions CommonAssemblyInfo.cs → src/CommonAssemblyInfo.cs
@@ -1,13 +1,13 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// The version identifiers are automatically updated via the build script. // This code was generated by Cake.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
using System.Reflection; using System.Reflection;


[assembly: AssemblyProduct("ReactiveUI")] [assembly: AssemblyProduct("ReactiveUI")]
[assembly: AssemblyVersion("1.0.0")] [assembly: AssemblyVersion("7.0.0")]
[assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyFileVersion("7.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyInformationalVersion("7.0.0")]
[assembly: AssemblyCopyright("Copyright (c) ReactiveUI and contributors")] [assembly: AssemblyCopyright("Copyright (c) ReactiveUI and contributors")]


43 changes: 43 additions & 0 deletions src/ReactiveUI-Events.nuspec
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>reactiveui-events</id>
<version>$version$</version>
<description>ReactiveUI.Events adds Observable-based events to UI controls and other appropriate places.</description>
<authors>Paul Betts</authors>
<projectUrl>http://www.reactiveui.net</projectUrl>
<licenseUrl>http://opensource.org/licenses/ms-pl.html</licenseUrl>
<language>en-us</language>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<dependencies>
<group>
<dependency id="Rx-Main" version="2.2.5" />
</group>
<group targetFramework="uap10.0">
<dependency id="Rx-Interfaces" version="2.2.5" />
<dependency id="Rx-Linq" version="2.2.5" />
<dependency id="System.ObjectModel" version="4.0.10" />
<dependency id="System.Runtime" version="4.0.20" />
<dependency id="System.Runtime.InteropServices.WindowsRuntime" version="4.0.0" />
</group>
</dependencies>
</metadata>
<files>
<!-- Android -->
<file src="bin/Release/MonoAndroid/ReactiveUI.Events.dll" target="lib/MonoAndroid/ReactiveUI.Events.dll" />
<!-- iOS Unified API -->
<file src="bin/Release/Xamarin.iOS10/ReactiveUI.Events.dll" target="lib/Xamarin.iOS10/ReactiveUI.Events.dll" />
<!-- Mac Unified API -->
<!-- <file src="Release/Xamarin.iOS10/ReactiveUI.Events.dll" target="lib/Xamarin.iOS10/ReactiveUI.Events.dll" /> -->
<!-- Windows Phone Silverlight -->
<file src="bin/Release/WP81/ReactiveUI.Events.dll" target="lib/WP81/ReactiveUI.Events.dll" />
<!-- Windows Store 8.1 -->
<file src="bin/Release/WPA81/ReactiveUI.Events.dll" target="lib/WPA81/ReactiveUI.Events.dll" />
<!-- Windows Universal -->
<file src="bin/Release/UAP10.0/ReactiveUI.Events.dll" target="lib/UAP10/ReactiveUI.Events.dll" />
<!-- Portable PCL -->
<file src="bin/Release/Portable-Net45+WinRT45+WP8+MonoAndroid10+MonoTouch10/ReactiveUI.Events_XamForms.dll" target="lib/Portable-Net45+WinRT45+WP8+MonoAndroid10+MonoTouch10/ReactiveUI.Events_XamForms.dll" />
<!-- Source -->
<file src="*.cs" target="src" />
</files>
</package>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -44,7 +44,7 @@
<DocumentationFile>bin\Release\uap10.0\ReactiveUI.Events.XML</DocumentationFile> <DocumentationFile>bin\Release\uap10.0\ReactiveUI.Events.XML</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<NuSpecFile Include="..\NuGet\ReactiveUI-Events\ReactiveUI-Events.nuspec"> <NuSpecFile Include="..\ReactiveUI-Events.nuspec">
<Visible>False</Visible> <Visible>False</Visible>
</NuSpecFile> </NuSpecFile>
</ItemGroup> </ItemGroup>
Expand Down Expand Up @@ -74,4 +74,4 @@
<VisualStudioVersion>14.0</VisualStudioVersion> <VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project> </Project>
Expand Up @@ -2,10 +2,11 @@
"dependencies": { "dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"NuSpec.ReferenceGenerator": "1.4.2", "NuSpec.ReferenceGenerator": "1.4.2",
"Rx-XAML": "2.2.5" "Rx-Main": "2.2.5",
"Splat": "1.6.2"
}, },
"frameworks": { "frameworks": {
"uap10.0": { } "uap10.0": {}
}, },
"runtimes": { "runtimes": {
"win10-arm": {}, "win10-arm": {},
Expand All @@ -15,4 +16,4 @@
"win10-x64": {}, "win10-x64": {},
"win10-x64-aot": {} "win10-x64-aot": {}
} }
} }
File renamed without changes.

0 comments on commit 6b7b9ae

Please sign in to comment.