Browse Source

fix tag names

pull/69/head
Scott Williams 10 years ago
parent
commit
408c3bd19f
  1. 6
      ImageSharp.sln
  2. 14
      build/Program.cs
  3. 8
      build/project.json

6
ImageSharp.sln

@ -11,19 +11,17 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImageSharp.Benchmarks", "te
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.travis.yml = .travis.yml .travis.yml = .travis.yml
build\appveyor-project-version-patch.js = build\appveyor-project-version-patch.js
build\appveyor-semver.ps1 = build\appveyor-semver.ps1
appveyor.yml = appveyor.yml appveyor.yml = appveyor.yml
CodeCoverage.runsettings = CodeCoverage.runsettings CodeCoverage.runsettings = CodeCoverage.runsettings
contributing.md = contributing.md contributing.md = contributing.md
build\dotnet-latest.ps1 = build\dotnet-latest.ps1 dotnet-latest.ps1 = dotnet-latest.ps1
features.md = features.md features.md = features.md
global.json = global.json global.json = global.json
ImageSharp.ruleset = ImageSharp.ruleset ImageSharp.ruleset = ImageSharp.ruleset
ImageSharp.sln.DotSettings = ImageSharp.sln.DotSettings ImageSharp.sln.DotSettings = ImageSharp.sln.DotSettings
NuGet.config = NuGet.config NuGet.config = NuGet.config
build\package.json = build\package.json
README.md = README.md README.md = README.md
Rebracer.xml = Rebracer.xml Rebracer.xml = Rebracer.xml
Settings.StyleCop = Settings.StyleCop Settings.StyleCop = Settings.StyleCop

14
build/Program.cs

@ -250,8 +250,7 @@ namespace ConsoleApplication
internal string CalculateVersionNumber(string branch) internal string CalculateVersionNumber(string branch)
{ {
var version = this.Version.ToFullString(); var version = this.Version.ToFullString();
if (this.commitCount == 1 && branch == "") //master only if (this.commitCount == 1 && branch == "") //master only
{ {
if (this.Version.IsPrerelease) if (this.Version.IsPrerelease)
@ -263,6 +262,7 @@ namespace ConsoleApplication
//only 1 commit (the changing one) we will skip appending suffix //only 1 commit (the changing one) we will skip appending suffix
return version; return version;
} }
var rootSpecialVersion = ""; var rootSpecialVersion = "";
@ -276,10 +276,14 @@ namespace ConsoleApplication
{ {
rootSpecialVersion = "-" + rootSpecialVersion; rootSpecialVersion = "-" + rootSpecialVersion;
} }
if (branch == "") if (branch == "" && !this.Version.IsPrerelease)
{ {
branch = fallbackTag; branch = fallbackTag;
} }
if (branch.Length > 0)
{
branch = "-" + branch;
}
var maxLength = 20; var maxLength = 20;
maxLength -= rootSpecialVersion.Length; maxLength -= rootSpecialVersion.Length;
@ -288,8 +292,8 @@ namespace ConsoleApplication
{ {
branch = branch.Substring(0, maxLength); branch = branch.Substring(0, maxLength);
} }
return $"{version}{rootSpecialVersion}-{branch}-{this.commitCount:00000}"; return $"{version}{rootSpecialVersion}{branch}-{this.commitCount:00000}";
} }
} }
} }

8
build/project.json

@ -10,13 +10,7 @@
}, },
"frameworks": { "frameworks": {
"net46": { "net46": {
//"dependencies": { // this is only a net46 app because of LibGit2Sharp once they have a version that works on coreclr we can shift over.
// "Microsoft.NETCore.App": {
// "type": "platform",
// "version": "1.0.0"
// }
//},
//"imports": "dnxcore50"
} }
} }
} }

Loading…
Cancel
Save