Browse Source

add gitVersion function

pull/850/head
Siegfried Pammer 8 years ago
parent
commit
4563a8255a
  1. 26
      appveyor.yml

26
appveyor.yml

@ -1,11 +1,29 @@
version: 1.0.{build}
configuration: Debug configuration: Debug
platform: Any CPU platform: Any CPU
image: Visual Studio 2017 image: Visual Studio 2017
install: install:
- git submodule update --init --recursive - git submodule update --init --recursive
# force update ILSpy-tests to the latest ref - ps: |
- git submodule update --remote ILSpy-tests function gitVersion(){
$majorVersion = 3;
$minorVersion = 0;
$revision = 0;
$baseCommitHash = "d779383cb85003d6dabeb976f0845631e07bf463";
if ($env:APPVEYOR_REPO_BRANCH -ne 'master') {
$branch = "-$env:APPVEYOR_REPO_BRANCH";
} else {
$branch = "";
}
$build = git rev-list --count "$baseCommitHash..HEAD";
$newVersion="$majorVersion.$minorVersion.$revision.$build$branch";
write-host "Update appveyor build version to:$newVersion"
$env:appveyor_build_version="$newVersion"
appveyor UpdateBuild -Version "$newVersion"
}
gitVersion
before_build: before_build:
- nuget restore ILSpy.sln - nuget restore ILSpy.sln
build_script: build_script:
@ -15,4 +33,4 @@ test:
- 'ICSharpCode.Decompiler.Tests\bin\Debug\net461\ICSharpCode.Decompiler.Tests.exe' - 'ICSharpCode.Decompiler.Tests\bin\Debug\net461\ICSharpCode.Decompiler.Tests.exe'
- 'ILSpy.BamlDecompiler.Tests\bin\Debug\net461\ILSpy.BamlDecompiler.Tests.dll' - 'ILSpy.BamlDecompiler.Tests\bin\Debug\net461\ILSpy.BamlDecompiler.Tests.dll'
after_test: after_test:
- python BuildTools\tidy.py - python BuildTools\tidy.py
Loading…
Cancel
Save