All Projects β†’ ahmetb β†’ Govvv

ahmetb / Govvv

Licence: apache-2.0
"go build" wrapper to add version info to Golang applications

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Govvv

perfekt
Release, changelog and version your packages with perfe(k)t πŸ‘Œ ease!
Stars: ✭ 15 (-96.85%)
Mutual labels:  versioning
gtbump
git tag bump: A simple utility to bump and manage git semantic version tags and generate Markdown changelogs.
Stars: ✭ 15 (-96.85%)
Mutual labels:  versioning
Fastlane Plugin Versioning
Extends fastlane versioning actions. Allows to set/get versions without using agvtool and do some other small tricks.
Stars: ✭ 357 (-25%)
Mutual labels:  versioning
thema
A CUE-based framework for portable, evolvable schema
Stars: ✭ 41 (-91.39%)
Mutual labels:  versioning
dotnet-version-cli
dotnet version cli (similar to npm version cli)
Stars: ✭ 30 (-93.7%)
Mutual labels:  versioning
Python Semver
Python package to work with Semantic Versioning (http://semver.org/)
Stars: ✭ 264 (-44.54%)
Mutual labels:  versioning
sketch-json-cli
Transform sketch files to json and json to sketch files
Stars: ✭ 13 (-97.27%)
Mutual labels:  versioning
Paper trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history.
Stars: ✭ 380 (-20.17%)
Mutual labels:  versioning
laravel-temporal
Temporal models and versioning for Laravel
Stars: ✭ 19 (-96.01%)
Mutual labels:  versioning
Aspnetcore Webapi Course
Professional REST API design with ASP.NET Core 3.1 WebAPI
Stars: ✭ 323 (-32.14%)
Mutual labels:  versioning
updatebot
a simple bot for updating dependencies in source code
Stars: ✭ 30 (-93.7%)
Mutual labels:  versioning
McSherry.SemanticVersioning
A semantic versioning library for .NET 5, Core, FX, and Standard with version range support.
Stars: ✭ 16 (-96.64%)
Mutual labels:  versioning
Calver
πŸ“… The web's go-to resource for Calendar Versioning info.
Stars: ✭ 271 (-43.07%)
Mutual labels:  versioning
verpy
🐍 Python application versioning tool
Stars: ✭ 17 (-96.43%)
Mutual labels:  versioning
Jsemver
Java implementation of the SemVer Specification
Stars: ✭ 360 (-24.37%)
Mutual labels:  versioning
bncsutil
The Classic Battle.netβ„’ client library
Stars: ✭ 19 (-96.01%)
Mutual labels:  versioning
Pgmemento
Audit trail with schema versioning for PostgreSQL using transaction-based logging
Stars: ✭ 260 (-45.38%)
Mutual labels:  versioning
React Native Version
πŸ”’ Version your React Native or Expo app in a `npm version` fashion.
Stars: ✭ 408 (-14.29%)
Mutual labels:  versioning
Axion Release Plugin
Gradle release & version management plugin.
Stars: ✭ 372 (-21.85%)
Mutual labels:  versioning
Composure
Don't fear the Unix chainsaw
Stars: ✭ 272 (-42.86%)
Mutual labels:  versioning

govvv

The simple Go binary versioning tool that wraps the go build command.

Stop worrying about -ldflags and go get github.com/ahmetb/govvv now.

Build Variables

Variable Description Example
main.GitCommit short commit hash of source tree 0b5ed7a
main.GitBranch current branch name the code is built off master
main.GitState whether there are uncommitted changes clean or dirty
main.GitSummary output of git describe --tags --dirty --always v1.0.0,
v1.0.1-5-g585c78f-dirty,
fbd157c
main.BuildDate RFC3339 formatted UTC date 2016-08-04T18:07:54Z
main.Version contents of ./VERSION file, if exists, or the value passed via the -version option 2.0.0

Using govvv is easy

Just add the build variables you want to the main package and run:

old ✨ new ✨
go build govvv build
go install govvv install

Version your app with govvv

Create a VERSION file in your build root directory and add a Version variable to your main package.

Do you have your own way of specifying Version? No problem:

govvv lets you specify custom -ldflags

Your existing -ldflags argument will still be preserved:

govvv build -ldflags "-X main.BuildNumber=$buildnum" myapp

and the -ldflags constructed by govvv will be appended to your flag.

Don’t want to depend on govvv? It’s fine!

You can just pass a -print argument and govvv will just print the go build command with -ldflags for you and will not execute the go tool:

$ govvv build -print
go build \
    -ldflags \
    "-X main.GitCommit=57b9870 -X main.GitBranch=dry-run -X main.GitState=dirty -X main.Version=0.1.0 -X main.BuildDate=2016-08-08T20:50:21Z"

Still don’t want to wrap the go tool? Well, try -flags to retrieve the LDFLAGS govvv prepares:

$ go build -ldflags="$(govvv -flags)"

Want to use a different package?

You can pass a -pkg argument with the full package name, and govvv will set the build variables in that package instead of main. For example:

# build with govvv
$ govvv build -pkg github.com/myacct/myproj/mypkg

# build with go
$ go build -ldflags="$(govvv -flags -pkg $(go list ./mypkg))"

Want to use a different version?

You can pass a -version argument with the desired version, and govvv will use the specified version instead of obtaining it from the ./VERSION file. For example:

# build with govvv
$ govvv build -version 1.2.3

# build with go
$ go build -ldflags="$(govvv -flags -version 1.2.3)"

Try govvv today

$ go get github.com/ahmetb/govvv

govvv is distributed under Apache 2.0 License.

Copyright 2016 Ahmet Alp Balkan


Build Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].