Giter VIP home page Giter VIP logo

alm's Introduction

ALM

Semantic Versioning 2.0 for Netstandard 2.0

Current status : Build status codecov

Repository aimed to develop & improve a full CI pipeline, on NetStandard, with AppVeyor, Codecov, Sonarqube.

We publish artefact on different targets (internal appveyor nuget feed and official nuget.org server)

Howto :

Use ComputeVersion.ps1 for automatic version numbering

  - ps: . .\build\ComputeVersion.ps1
  - ps: $version = Compute "Alm\Alm.csproj" $env:APPVEYOR_BUILD_NUMBER $env:APPVEYOR_REPO_TAG $env:APPVEYOR_PULL_REQUEST_NUMBER
  - ps: Update-AppveyorBuild -Version $version.Semver

Then you can use the $version variable to access the computed next version :

  • $version.Nearest = 1.2.3.0 (last version found)
  • $version.Semver = 0.2.0-dev-0 (semver version)
  • $version.Assembly = 0.2.0.0 (assembly version)

Note on csproj : you should replace actual <Version>1.2.3.4</Version> with the following :

	<VersionPrefix>1.2.3</VersionPrefix>
	<VersionSuffix>alpha4</VersionSuffix>
	<PackageVersion>1.2.3-alpha4</PackageVersion>

If you leave <Version>...</Version> in place, msbuild will not be able to substitute version with SemVer2 compatible versions.

Version numbering :

SemVer Version Use case Publish target Remark
1.2.3-dev-Z local dev build local Z = local counter
1.2.3-PR4824-X Pull Request build private X = remote counter
1.2.3-rc3-X build on master, without commit tag private X = remote counter (last git tag = 1.2.3-rc3)
1.2.3-beta-X build on master, without commit tag private X = remote counter (last git tag = 1.2.3)
1.2.3-rc3 build on master, with git Tag = "1.2.3-rc3" public pre-release
1.2.4 build on master, with git Tag = "1.2.3" public release

Known issues :

  • Currently, dotnet build CLI isn't supported by sonar, same for code coverage
  • We currently need 2 compilations : 1 for sonar, 1 for the tests

A word of caution :

If your package version contains one of the following, they will not be visible from the older clients (NuGet clients before 4.3.0 or Visual Studio before 2017 version 15.3):

  • The pre-release label is dot-separated, e.g. 1.0.0-alpha.1
  • The version has build-metadata, e.g. 1.0.0+githash

We recommend you consider this to be a beta-feature until a significant majority of our users are on these latest clients that understand Semantic Versioning 2.0.0. Read more on Semantic Versioning 2.0.0 NuGet support, here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.