git-versioning-presentation



git-versioning-presentation

0 0


git-versioning-presentation

Versioning git projects presentation

On Github tpluscode / git-versioning-presentation

Versioning .NET projects

With git repositories

git-versioning.t-code.pl

About me

Tomasz Pluskiewicz

Assembly version

Major.Minor.Build.Revision

Assembly versions

[assembly: AssemblyVersion("2.3")]
[assembly: AssemblyFileVersion("2.3.4.1556")]
[assembly: AssemblyInformationalVersion("2.3-alpha-yo")]

Calculating versions

The MSbuild way

[assembly: AssemblyVersion("2.3.*")]

[assembly: AssemblyVersion("2.3.5354.19262")]

The good

The bad

Meaningless build and revision Every build has new number Older code more built recently get higher number

The old skool way

Build - autoincremented or set on build server

Revision - commit number

build number can identify build setup

The good

Build number can precisely identify build setup Revision indicates exact code revision Sensible build numbers on dev machines

The bad

65k limit - won't work with large/old repository Won't work with DVCS at all (SH1 numbers) How do we set build number?

What about major.minor

  • Separate file in repository?
  • Patching AssemblyInfo.cs?
  • Variables on build server?
  • Tag in repository?

Zoltu.Versioning

https://github.com/Zoltu/Zoltu.Versioning

Setup

Install-Package Zoltu.Versioning

How it works

How it works

Demo

The good

Simple setup and principle Consistent versions across dev and build machines SemVer-friendly

The bad

Requires local clone Version clashes across branches Not very flexible - yet Young (July 2014)

GitVersion

https://github.com/ParticularLabs/GitVersion/

Example

The good

Consistent versions across dev and build machines Even more SemVer-friendly Supports GitFlow and GitHubFlow More mature and feature-rich

The bad

Complex

The end

Questions?