Skip to content

Commit 0152a83

Browse files
author
Jason Valdez
committed
Updated build script to include release candidate
1 parent 0cdd373 commit 0152a83

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

build.cake

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
var target = Argument ("target", "Default");
77
var configuration = Argument ("configuration", "Release");
88
var version = Argument ("build_version", "1.0.0.0");
9+
var releaseCandidate = Argument ("release_candidate", "0");
910

1011
Information("target: {0}", target);
1112
Information("configuration: {0}", configuration);
1213
Information("build_version: {0}", version);
14+
Information("release_candidate: {0}", releaseCandidate);
1315

1416
//////////////////////////////////////////////////////////////////////
1517
// PREPARATION
@@ -135,7 +137,12 @@ Task ("BuildSqlServerPackages")
135137
};
136138
var projectPath = sourceDir.Path + "/ivaldez.SqlBulkLoader/ivaldez.Sql.SqlBulkLoader.csproj";
137139

138-
XmlPoke(projectPath, "/Project/PropertyGroup/Version", version);
140+
var package_version = version;
141+
if (releaseCandidate != "0"){
142+
package_version = package_version + "-rc" + releaseCandidate;
143+
}
144+
145+
XmlPoke(projectPath, "/Project/PropertyGroup/Version", package_version);
139146
XmlPoke(projectPath, "/Project/PropertyGroup/AssemblyVersion", version);
140147

141148
DotNetCorePack (projectPath, settings);
@@ -152,8 +159,13 @@ Task ("BuildPostgrePackages")
152159
IncludeSymbols = true
153160
};
154161
var projectPath = sourceDir.Path + "/ivaldez.SqlBulkLoader.PostgreSql/ivaldez.SqlBulkLoader.PostgreSql.csproj";
162+
163+
var package_version = version;
164+
if (releaseCandidate != "0"){
165+
package_version = package_version + "-rc" + releaseCandidate;
166+
}
155167

156-
XmlPoke(projectPath, "/Project/PropertyGroup/Version", version);
168+
XmlPoke(projectPath, "/Project/PropertyGroup/Version", package_version);
157169
XmlPoke(projectPath, "/Project/PropertyGroup/AssemblyVersion", version);
158170

159171
DotNetCorePack (projectPath, settings);

0 commit comments

Comments
 (0)