Skip to content

Commit

Permalink
Extended scripts to updated nuspec dependecy version of mvx plugin an…
Browse files Browse the repository at this point in the history
…d vanilla plugin
  • Loading branch information
sead committed May 12, 2016
1 parent d5d9cac commit cb1db7f
Show file tree
Hide file tree
Showing 16 changed files with 361 additions and 342 deletions.
12 changes: 5 additions & 7 deletions .build/MvvmCross.Plugin.BLE.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>MvvmCross.Plugin.BLE</id>
<version>0.9.4</version>
<version>1.0.0-beta</version>
<title>MvvmCross - BLE Plugin</title>
<authors>xabre, smstube</authors>
<owners>xabre, smstube</owners>
Expand All @@ -17,15 +17,15 @@
<dependencies>
<group targetFramework="MonoAndroid">
<dependency id="MvvmCross.Platform" version="4.1.0" />
<dependency id="Xam.Plugin.BLE" version="0.9.4" />
<dependency id="Plugin.BLE" version="1.0.0-beta" />
</group>
<group targetFramework="Xamarin.iOS">
<dependency id="MvvmCross.Platform" version="4.1.0" />
<dependency id="Xam.Plugin.BLE" version="0.9.4" />
<dependency id="Plugin.BLE" version="1.0.0-beta" />
</group>
<group targetFramework="portable-net45+win8+wpa81+wp8">
<dependency id="MvvmCross.Platform" version="4.1.0" />
<dependency id="Xam.Plugin.BLE" version="0.9.4" />
<dependency id="Plugin.BLE" version="1.0.0-beta" />
</group>
</dependencies>
</metadata>
Expand All @@ -35,10 +35,8 @@
<file src="..\Source\MvvmCross.Plugins.BLE\**\*.cs" target="src\MvvmCross.Plugins.BLE" />
<file src="..\Source\MvvmCross.Plugins.BLE.Droid\**\*.cs" target="src\MvvmCross.Plugins.BLE.Droid" />
<file src="..\Source\MvvmCross.Plugins.BLE.iOS\**\*.cs" target="src\MvvmCross.Plugins.BLE.iOS" />-->

<!-- PCL -->
<file src="mvx\pcl\MvvmCross.Plugins.BLE.*" target="lib\portable-net45+win8+wpa81+wp8" />

<!-- droid -->
<file src="mvx\android\MvvmCross.Plugins.BLE.*" target="lib\MonoAndroid" />
<file src="mvx\android\MvvmCross.Plugins.BLE.Droid.*" target="lib\MonoAndroid" />
Expand All @@ -48,4 +46,4 @@
<file src="mvx\ios\MvvmCross.Plugins.BLE.iOS.*" target="lib\Xamarin.iOS10" />
<file src="mvx\ios\BlePluginBootstrap.cs.pp" target="content\Xamarin.iOS10\Bootstrap\BlePluginBootstrap.cs.pp" />
</files>
</package>
</package>
9 changes: 3 additions & 6 deletions .build/Plugin.BLE.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Plugin.BLE</id>
<version>0.9.4</version>
<version>1.0.0-beta</version>
<title>BLE Plugin for Xamarin</title>
<authors>xabre, smstube</authors>
<owners>xabre, smstube</owners>
Expand All @@ -23,15 +23,12 @@
</group>
</dependencies>
</metadata>
<files>
<!-- PCL -->
<files>
<!-- PCL -->
<file src="pcl\Plugin.BLE.*" target="lib\portable-net45+win8+wpa81+wp8" />

<!-- droid -->
<file src="android\Plugin.BLE.*" target="lib\MonoAndroid" />

<!-- iOS -->
<file src="ios\Plugin.BLE.*" target="lib\Xamarin.iOS10" />

</files>
</package>
26 changes: 25 additions & 1 deletion .build/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let BootstrapFile = "BlePluginBootstrap.cs.pp"
let NugetPath = Path.Combine("..", "Source", ".nuget", "NuGet.exe");
let ProjectSources = Path.Combine("..", "Source");
let NuspecFiles = ["Plugin.BLE.nuspec"; "MvvmCross.Plugin.BLE.nuspec"];
let VanillaPluginId = "Plugin.BLE";

let Build (projectName:string, targetSubDir:string) =
[Path.Combine(ProjectSources, projectName, projectName + ".csproj")]
Expand All @@ -30,6 +31,21 @@ let NuVersionGet (specFile:string) =
let versionElements = doc.Descendants(XName.Get("version", doc.Root.Name.NamespaceName))
(Seq.head versionElements).Value

let NuVersionVanillaDependencySet (specFile:string, version:string) =
let xmlDocument = new XmlDocument()
xmlDocument.Load specFile
let nsmgr = XmlNamespaceManager(xmlDocument.NameTable)
nsmgr.AddNamespace("ns", "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd")
let dependencyNodes = xmlDocument.DocumentElement.SelectNodes("//ns:dependency", nsmgr)

let setAttributeVersion (node:XmlElement) =
if node.GetAttribute("id").Equals(VanillaPluginId) then
node.SetAttribute("version", version)

for node in dependencyNodes do
node :?> XmlElement |> setAttributeVersion
xmlDocument.Save specFile

let NuVersionSet (specFile:string, version:string) =
let xmlDocument = new XmlDocument()
xmlDocument.Load specFile
Expand All @@ -39,6 +55,7 @@ let NuVersionSet (specFile:string, version:string) =
node.InnerText <- version
xmlDocument.Save specFile


let NuPack (specFile:string, publish:bool) =
let version = NuVersionGet(specFile)
let project = Path.GetFileNameWithoutExtension(specFile)
Expand Down Expand Up @@ -105,7 +122,14 @@ Target "version" (fun _ ->
AssemblyInformationalVersion = version
})

List.iter (fun f -> NuVersionSet(f, version)) NuspecFiles
let updateVersions(file : string, version : string) =
NuVersionSet(file, version)
NuVersionVanillaDependencySet(file, version)

NuspecFiles |> List.iter (fun file ->

updateVersions(file, version)
)
)

Target "publish" (fun _ ->
Expand Down
68 changes: 34 additions & 34 deletions Source/BLE.Client/BLE.Client.Droid/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Client.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BLE.Client.Droid")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyFileVersion("0.9.4")]

// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Client.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BLE.Client.Droid")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]

// Add some common permissions, these can be removed if not needed
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
72 changes: 36 additions & 36 deletions Source/BLE.Client/BLE.Client.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Client.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BLE.Client.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyFileVersion("0.9.4")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Client.iOS")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BLE.Client.iOS")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
8 changes: 4 additions & 4 deletions Source/BLE.Client/BLE.Client/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyFileVersion("0.9.4")]
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
// [assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
60 changes: 30 additions & 30 deletions Source/BLE.Server.Droid/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Server.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Zuehlke Technology Group")]
[assembly: AssemblyProduct("BLE.Server.Droid")]
[assembly: AssemblyCopyright("Copyright © Zuehlke Technology Group 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyVersion("0.9.4")]
[assembly: AssemblyFileVersion("0.9.4")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BLE.Server.Droid")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Zuehlke Technology Group")]
[assembly: AssemblyProduct("BLE.Server.Droid")]
[assembly: AssemblyCopyright("Copyright © Zuehlke Technology Group 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("1.0.0")]
Loading

0 comments on commit cb1db7f

Please sign in to comment.