Skip to content

Commit

Permalink
Updated build scrips
Browse files Browse the repository at this point in the history
  • Loading branch information
ravensorb committed Oct 3, 2018
1 parent f4cd29c commit 09d3925
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
14 changes: 13 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,22 @@ Task("Nuget-Package-DotNetCore")
CreateDirectory(artifactsPath);
var dotNetCoreBuildSettings = new DotNetCoreMSBuildSettings();
if (!string.IsNullOrEmpty(versionInfo.ToVersionPrefix()))
dotNetCoreBuildSettings.SetVersionPrefix(versionInfo.ToVersionPrefix());
if (!string.IsNullOrEmpty(versionInfo.ToVersionSuffix()))
dotNetCoreBuildSettings.SetVersionSuffix(versionInfo.ToVersionSuffix());
if (!string.IsNullOrEmpty(versionInfo.ToString()))
dotNetCoreBuildSettings.SetFileVersion(versionInfo.ToString(true));
var dncps = new DotNetCorePackSettings
{
Configuration = settings.Configuration,
OutputDirectory = artifactsPath
OutputDirectory = artifactsPath,
IncludeSymbols = settings.NuGet.IncludeSymbols,
NoBuild = true,
NoRestore = true,
MSBuildSettings = dotNetCoreBuildSettings
};
Information("Location of Artifacts: {0}", artifactsPath);
Expand Down
3 changes: 2 additions & 1 deletion build.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"UpdateLibraryDependencies": false,
"VersionDependencyForLibrary": "greaterthanorequal",
"LibraryNamespaceBase": "",
"LibraryMinVersionDependency": ""
"LibraryMinVersionDependency": "",
"IncludeSymbols": true
}
}
2 changes: 1 addition & 1 deletion build.version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Major":1,"Minor":1,"Build":7,"PreRelease":0,"ReleaseNotes":null,"Semantic":null,"Milestone":null,"CakeVersion":"0.30.0.0","IsPreRelease":false}
{"Major":1,"Minor":1,"Build":8,"PreRelease":0,"ReleaseNotes":null,"Semantic":null,"Milestone":null,"CakeVersion":"0.30.0.0","IsPreRelease":false}
4 changes: 2 additions & 2 deletions src/AssemblyInfo.Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.1.7")]
//[assembly: AssemblyFileVersion("1.1.7")]
[assembly: AssemblyVersion("1.1.8")]
//[assembly: AssemblyFileVersion("1.1.8")]

// 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
Expand Down
12 changes: 11 additions & 1 deletion tools/settingsUtils.cake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public class SettingsUtils
obj.SettingsFile = settingsFile;

obj.RootPath = context.MakeAbsolute(context.Directory(obj.RootPath)).ToString() + "/";
if (obj.Build.ArtifactsPath.StartsWith("./")) obj.Build.ArtifactsPath.Replace("./", obj.RootPath);
if (obj.Build.ArtifactsPath.StartsWith("./")) obj.Build.ArtifactsPath = obj.Build.ArtifactsPath.Replace("./", obj.RootPath);
if (obj.Build.ArtifactsPath.Contains("[ROOTPATH]")) obj.Build.ArtifactsPath = obj.Build.ArtifactsPath.Replace("[ROOTPATH]", obj.RootPath);

context.Information("Updating ArtifactsPath to {0}}", obj.Build.ArtifactsPath);

// Allow for any overrides
obj.Target = context.Argument<string>("target", obj.Target);
Expand Down Expand Up @@ -66,6 +69,11 @@ public class SettingsUtils

obj.NuGet.LibraryMinVersionDependency = (context.Argument<string>("dependencyVersion", obj.NuGet.LibraryMinVersionDependency)).Replace(":",".");
obj.NuGet.VersionDependencyTypeForLibrary = context.Argument<VersionDependencyTypes>("dependencyType", obj.NuGet.VersionDependencyTypeForLibrary);

if (obj.NuGet.ArtifactsPath.StartsWith("./")) obj.NuGet.ArtifactsPath = obj.NuGet.ArtifactsPath.Replace("./", obj.RootPath);
if (obj.NuGet.ArtifactsPath.Contains("[ROOTPATH]")) obj.NuGet.ArtifactsPath = obj.NuGet.ArtifactsPath.Replace("[ROOTPATH]", obj.RootPath);
if (obj.NuGet.NuGetConfig.StartsWith("./")) obj.NuGet.NuGetConfig = obj.NuGet.NuGetConfig.Replace("./", obj.RootPath);
if (obj.NuGet.NuGetConfig.Contains("[ROOTPATH]")) obj.NuGet.NuGetConfig = obj.NuGet.NuGetConfig.Replace("[ROOTPATH]", obj.RootPath);

return obj;
}
Expand Down Expand Up @@ -304,6 +312,7 @@ public class NuGetSettings
public bool UpdateLibraryDependencies {get;set;}
public string LibraryNamespaceBase {get;set;}
public string LibraryMinVersionDependency {get;set;}
public bool IncludeSymbols {get;set;}

public string NuSpecFileSpec {
get {
Expand Down Expand Up @@ -333,6 +342,7 @@ public class NuGetSettings
context.Information("\tForce Version Match: {0}", VersionDependencyTypeForLibrary);
context.Information("\tLibrary Namespace Base: {0}", LibraryNamespaceBase);
context.Information("\tLibrary Min Version Dependency: {0}", LibraryMinVersionDependency);
context.Information("\tInclude Symbols: {0}", IncludeSymbols);
}
}

Expand Down

0 comments on commit 09d3925

Please sign in to comment.