зеркало из
1
0
Форкнуть 0

Add suffix to teamcity extension

This commit is contained in:
Charlie Poole 2016-06-22 17:24:33 -07:00
Родитель 0ebc432070
Коммит f98fcd7b57
1 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -19,6 +19,10 @@ var ErrorDetail = new List<string>();
var version = "3.3.0";
var modifier = "";
//For now, set teamcity extension verson and modifier separately
var tcVersion = "1.0.0";
var tcModifier = "";
var isCompactFrameworkInstalled = FileExists(Environment.GetEnvironmentVariable("windir") + "\\Microsoft.NET\\Framework\\v3.5\\Microsoft.CompactFramework.CSharp.targets");
//Find program files on 32-bit or 64-bit Windows
@ -28,6 +32,7 @@ var isSilverlightSDKInstalled = FileExists(programFiles + "\\MSBuild\\Microsoft
var isAppveyor = BuildSystem.IsRunningOnAppVeyor;
var dbgSuffix = configuration == "Debug" ? "-dbg" : "";
var packageVersion = version + modifier + dbgSuffix;
var teamcityVersion = tcVersion + tcModifier + dbgSuffix;
//////////////////////////////////////////////////////////////////////
// SUPPORTED FRAMEWORKS
@ -111,17 +116,23 @@ Task("InitializeBuild")
if (tag.IsTag)
{
packageVersion = tag.Name;
// NOTE: tag doesn't currently change the TeamCity version
}
else
{
var buildNumber = AppVeyor.Environment.Build.Number;
packageVersion = version + "-CI-" + buildNumber + dbgSuffix;
var suffix = "-CI-" + buildNumber + dbgSuffix;
if (AppVeyor.Environment.PullRequest.IsPullRequest)
packageVersion += "-PR-" + AppVeyor.Environment.PullRequest.Number;
suffix += "-PR-" + AppVeyor.Environment.PullRequest.Number;
else if (AppVeyor.Environment.Repository.Branch.StartsWith("release", StringComparison.OrdinalIgnoreCase))
packageVersion += "-PRE-" + buildNumber;
suffix += "-PRE-" + buildNumber;
else
packageVersion += "-" + AppVeyor.Environment.Repository.Branch;
suffix += "-" + AppVeyor.Environment.Repository.Branch;
packageVersion = version + suffix;
teamcityVersion = tcVersion + suffix;
}
AppVeyor.UpdateBuildVersion(packageVersion);
@ -681,7 +692,7 @@ Task("PackageNuGet")
NuGetPack("nuget/extensions/teamcity-event-listener.nuspec", new NuGetPackSettings()
{
// The teamcity-event-listener extension uses its own versioning
Version = "1.0.0" + dbgSuffix,
Version = teamcityVersion,
BasePath = currentImageDir,
OutputDirectory = PACKAGE_DIR,
NoPackageAnalysis = true