autotag

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

README

Circle CI

AutoTag

Automatically add version tags to a git repo based on commit messages.

Installing

On Linux the easy way to get going is to use the pre-built binary release from github releases.

Usage

The default behavior with no arguments will tag a new version on current repo and emit the version tagged

$ autotag
v3.2.1

you can get more help using -h flag

$ autotag -h
Usage:
  autotag [OPTIONS]

Application Options:
  -n          Just output the next version, don't autotag
  -v          Enable verbose logging
  -r, --repo= Path to the repo (./)

Help Options:
  -h, --help  Show this help message

Build from Source

Assuming you have Go 1.5+ installed you can checkout and run make deps build to compile the binary. It will be built as ./autotag/autotag

git clone git@github.com:pantheon-systems/autotag.git 

cd autotag

make deps build

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRepo

type GitRepo struct {
	// contains filtered or unexported fields
}

GitRepo represents a repository we want to run actions against

func NewRepo

func NewRepo(repoPath, branch string) (*GitRepo, error)

NewRepo is a constructor for a repo object, parsing the tags that exist

func (*GitRepo) AutoTag

func (r *GitRepo) AutoTag() error

AutoTag applies the new version tag thats calculated

func (*GitRepo) LatestVersion

func (r *GitRepo) LatestVersion() string

LatestVersion Reports the Lattest version of the given repo TODO:(jnelson) this could be more intelligent, looking for a nil new and reporitng the latest version found if we refactor autobump at some point Mon Sep 14 13:05:49 2015

func (*GitRepo) MajorBump

func (r *GitRepo) MajorBump() (*version.Version, error)

MajorBump will bump the version one major rev 1.0.0 -> 2.0.0

func (*GitRepo) MinorBump

func (r *GitRepo) MinorBump() (*version.Version, error)

MinorBump will bump the version one minor rev 1.1.0 -> 1.2.0

func (*GitRepo) PatchBump

func (r *GitRepo) PatchBump() (*version.Version, error)

PatchBump will bump the version one patch rev 1.1.1 -> 1.1.2

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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