From cdb43d4fb6acf5438a0ae9c6e6688a035c2803e7 Mon Sep 17 00:00:00 2001 From: avk Date: Sat, 15 Sep 2018 02:41:03 +0500 Subject: [PATCH] use Nerdbank.GitVersioning to automate generation of assembly and nuget package versions --- CHANGELOG.md | 13 +++++++ Directory.Build.props | 4 +++ Directory.Build.targets | 13 +++++++ GrobExp.Compiler/GrobExp.Compiler.csproj | 12 +------ README.md | 6 +++- appveyor.yml | 44 ++++++++++++++++++++++++ version.json | 20 +++++++++++ 7 files changed, 100 insertions(+), 12 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 version.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..954f4fd --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Changelog + +## v1.2 - 2018.09.15 +- Use [Nerdbank.GitVersioning](https://github.com/AArnott/Nerdbank.GitVersioning) to automate generation of assembly + and nuget package versions. +- Update [Gremit](https://github.com/skbkontur/gremit) dependency to v2.3.6. +- Fix bugs in `CallExpressionEmitter` (PR #5). +- Support `enum`, `decimal`, and `Nullable` as types of constants in expressions passed + to `LambdaCompiler.CompileToMethod()` (PR #6). + +## v1.1 - 2018.01.07 +- Support .NET Standard 2.0. +- Switch to SDK-style project format and dotnet core build tooling. diff --git a/Directory.Build.props b/Directory.Build.props index 74e410f..ce9c32a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,4 +12,8 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + + + + \ No newline at end of file diff --git a/Directory.Build.targets b/Directory.Build.targets index cb19e7e..1ba0115 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -7,4 +7,17 @@ + + + $(AssemblyName) + Igor Chevdar + .NET Expression Tree Compiler + Efficient compiler of .NET expression trees + git + https://github.com/skbkontur/GrobExp.Compiler + $(RepositoryUrl) + $(RepositoryUrl)/releases/tag/v$(MajorMinorVersion)-release + + + \ No newline at end of file diff --git a/GrobExp.Compiler/GrobExp.Compiler.csproj b/GrobExp.Compiler/GrobExp.Compiler.csproj index cb3329b..1ba7bed 100644 --- a/GrobExp.Compiler/GrobExp.Compiler.csproj +++ b/GrobExp.Compiler/GrobExp.Compiler.csproj @@ -2,20 +2,10 @@ netstandard2.0;net45 - GrobExp.Compiler - 1.1.1 - $(VersionPrefix) - $(VersionPrefix).0 - Igor Chevdar - .NET Expression Tree Compiler - Efficient compiler of .NET expression trees - git - https://github.com/skbkontur/GrobExp.Compiler - $(RepositoryUrl) - + diff --git a/README.md b/README.md index 87798c3..c146304 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,8 @@ [![Build Status](https://travis-ci.org/skbkontur/GrobExp.Compiler.svg?branch=master)](https://travis-ci.org/skbkontur/GrobExp.Compiler) [![Build status](https://ci.appveyor.com/api/projects/status/acccupshv2d0980e?svg=true)](https://ci.appveyor.com/project/skbkontur/grobexp-compiler) -GrobExp.Compiler helps efficiently compile expression trees. \ No newline at end of file +GrobExp.Compiler helps efficiently compile expression trees. + +## Release Notes + +See [CHANGELOG](CHANGELOG.md). diff --git a/appveyor.yml b/appveyor.yml index f1658a3..eeeb7c4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,29 @@ +version: '{build}' + +skip_commits: + files: + - '**/*.md' + image: Visual Studio 2017 init: - cmd: git config --global core.autocrlf false + - ps: | + $ErrorActionPreference = "Stop" + $tagName = $env:APPVEYOR_REPO_TAG_NAME + if ($tagName -match '^v\d+\.\d+') # tag name starts with 'vX.Y' + { + $env:SHOULD_PUBLISH_NUGET_PACKAGE = "true" + Write-Host "Will publish nuget package for $tagName tag" -ForegroundColor "Green" + if ($tagName -match '^v\d+\.\d+-release$') # tag name matches 'vX.Y-release' + { + $env:SHOULD_CREATE_RELEASE = "true" + Write-Host "Will create release for $tagName tag" -ForegroundColor "Green" + } + } + +nuget: + disable_publish_on_pr: true before_build: - cmd: dotnet --info @@ -9,6 +31,28 @@ before_build: build_script: - cmd: dotnet build --configuration Release ./GrobExp.Compiler.sln + - cmd: dotnet pack --no-build --configuration Release ./GrobExp.Compiler.sln test_script: - cmd: dotnet test --no-build --configuration Release --filter TestCategory!=LongRunning ./GrobExp.Compiler.Tests/GrobExp.Compiler.Tests.csproj + +artifacts: + - path: './GrobExp.Compiler/bin/Release/*.nupkg' + +deploy: + - provider: NuGet + server: https://nuget.org + api_key: + secure: dzTnT0xSlPrHnrG06cj354nTN4lXWhfh4ZCJ1910I3VnNdvbx0rQFLTyJ5l1+bgB + skip_symbols: true + on: + SHOULD_PUBLISH_NUGET_PACKAGE: true + + - provider: GitHub + tag: $(APPVEYOR_REPO_TAG_NAME) + auth_token: + secure: y8dDOcAtq4U1MTDJFX8f23xsvyFU1u4bhwr9Lzbkf2revNWPPTifBkWghris9v8i + draft: false + prerelease: false + on: + SHOULD_CREATE_RELEASE: true diff --git a/version.json b/version.json new file mode 100644 index 0000000..9a35ff8 --- /dev/null +++ b/version.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "1.2", + "assemblyVersion": { + "precision": "build" + }, + "publicReleaseRefSpec": [ + "^refs/heads/master$", + "^refs/tags/v\\d+\\.\\d+" + ], + "nugetPackageVersion": { + "semVer": 2 + }, + "cloudBuild": { + "setVersionVariables": true, + "buildNumber": { + "enabled": false + } + } +} \ No newline at end of file