Browse Source

Fix nuspec for release builds.

pull/925/merge
Siegfried Pammer 8 years ago
parent
commit
fa83221b67
  1. 11
      BuildTools/update-assemblyinfo.ps1
  2. 2
      ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template

11
BuildTools/update-assemblyinfo.ps1

@ -37,7 +37,7 @@ function Find-Git() { @@ -37,7 +37,7 @@ function Find-Git() {
function gitVersion() {
if (-not ((Test-Dir ".git") -and (Find-Git))) {
return 9999;
return 0;
}
return [Int32]::Parse((git rev-list --count "$baseCommit..HEAD")) + $baseCommitRev;
}
@ -107,6 +107,13 @@ try { @@ -107,6 +107,13 @@ try {
} else {
$postfixVersionName = "-$versionName";
}
$buildConfig = $args[0].ToString().ToLower();
if ($buildConfig -eq "release") {
$buildConfig = "";
} else {
$buildConfig = "-" + $buildConfig;
}
$fullVersionNumber = "$major.$minor.$build.$revision";
@ -124,7 +131,7 @@ try { @@ -124,7 +131,7 @@ try {
$out = $out.Replace('$INSERTBRANCHPOSTFIX$', $postfixBranchName);
$out = $out.Replace('$INSERTVERSIONNAME$', $versionName);
$out = $out.Replace('$INSERTVERSIONNAMEPOSTFIX$', $postfixVersionName);
$out = $out.Replace('$INSERTBUILDCONFIG$', $args[0].ToString().ToLower());
$out = $out.Replace('$INSERTBUILDCONFIG$', $buildConfig);
if (((Get-Content $file.Input) -Join [System.Environment]::NewLine) -ne $out) {
$out | Out-File -Encoding utf8 $file.Output;

2
ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>ICSharpCode.Decompiler</id>
<version>$INSERTVERSION$$INSERTVERSIONNAMEPOSTFIX$-$INSERTBUILDCONFIG$</version>
<version>$INSERTVERSION$$INSERTVERSIONNAMEPOSTFIX$$INSERTBUILDCONFIG$</version>
<title>ILSpy Decompiler Engine</title>
<authors>Daniel Grunwald, David Srbecky, Ed Harvey, Siegfried Pammer</authors>
<owners>Daniel Grunwald, SharpDevelop</owners>

Loading…
Cancel
Save