Skip to content

Commit

Permalink
use Nerdbank.GitVersioning to automate generation of assembly and nug…
Browse files Browse the repository at this point in the history
…et package versions
  • Loading branch information
AndrewKostousov committed Sep 14, 2018
1 parent a8d05a1 commit cdb43d4
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 12 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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<TConstant>` 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.
4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.13" PrivateAssets="All" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,17 @@
</ItemGroup>
</Target>

<Target Name="SetNuSpecProperties" BeforeTargets="GenerateNuspec" DependsOnTargets="GetBuildVersion">
<PropertyGroup>
<PackageId>$(AssemblyName)</PackageId>
<Authors>Igor Chevdar</Authors>
<PackageTags>.NET Expression Tree Compiler</PackageTags>
<Description>Efficient compiler of .NET expression trees</Description>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/skbkontur/GrobExp.Compiler</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<PackageReleaseNotes>$(RepositoryUrl)/releases/tag/v$(MajorMinorVersion)-release</PackageReleaseNotes>
</PropertyGroup>
</Target>

</Project>
12 changes: 1 addition & 11 deletions GrobExp.Compiler/GrobExp.Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<PackageId>GrobExp.Compiler</PackageId>
<VersionPrefix>1.1.1</VersionPrefix>
<Version>$(VersionPrefix)</Version>
<AssemblyVersion>$(VersionPrefix).0</AssemblyVersion>
<Authors>Igor Chevdar</Authors>
<PackageTags>.NET Expression Tree Compiler</PackageTags>
<Description>Efficient compiler of .NET expression trees</Description>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/skbkontur/GrobExp.Compiler</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GrEmit" Version="2.2.3" />
<PackageReference Include="GrEmit" Version="2.3.6" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
GrobExp.Compiler helps efficiently compile expression trees.

## Release Notes

See [CHANGELOG](CHANGELOG.md).
44 changes: 44 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,58 @@
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
- cmd: dotnet restore ./GrobExp.Compiler.sln --verbosity m

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
20 changes: 20 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -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
}
}
}

0 comments on commit cdb43d4

Please sign in to comment.