giddyup

command module
v0.0.0-...-cb30e68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2017 License: MIT Imports: 13 Imported by: 0

README

giddyup

giddyup

giddyup is a tool that can be used as a go generate command (see main.go) or a standalone CLI to manage release versions of a golang application.

How to use

giddyup assumes a version.go file with a VERSION constant such. When executed with the default options, giddyup reads the current version and increments the patch-level in version.go. Since the file is meant to be managed by giddyup, interactions with it should be done using giddyup only. To initialize the version, you can run giddyup --init in your repository which will generate a version.go with the VERSION set to 1.0.0.

An application can then print its version using the VERSION string constant. Example using kingpin:

kingpin.Version(VERSION)

Integration with go generate

giddyup itself uses giddyup for managing its version. This is done by adding the following line to main.go:

//go:generate giddyup

Documentation

Overview

GENERATED and MANAGED by giddyup (https://github.com/alexandre-normand/giddyup)

Directories

Path Synopsis
Godeps
_workspace/src/github.com/alecthomas/template
Package template implements data-driven templates for generating textual output.
Package template implements data-driven templates for generating textual output.
_workspace/src/github.com/alecthomas/template/parse
Package parse builds parse trees for templates as defined by text/template and html/template.
Package parse builds parse trees for templates as defined by text/template and html/template.
_workspace/src/github.com/alecthomas/units
Package units provides helpful unit multipliers and functions for Go.
Package units provides helpful unit multipliers and functions for Go.
_workspace/src/gopkg.in/alecthomas/kingpin.v2
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.
Package kingpin provides command line interfaces like this: $ chat usage: chat [<flags>] <command> [<flags>] [<args> ...] Flags: --debug enable debug mode --help Show help.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL