go-aib

command module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 9 Imported by: 0

README

Go-aib

License Build Status Go Report Card Go Reference Version

Go auto-increment-build is a simple command line tool to increment the patch part of your version number so you just have to think about major and minor parts. It will parse a source file to find and increment a patch var/const, it will also update a timestamp var/const if you need it. Go-aib shoud be called before each build time.

Installation:

go get -u github.com/catamat/go-aib
go install github.com/catamat/go-aib

Options:

-fn [string]
	Go source file name (default "version.go")

-pn [string]
	Patch var/const name (default "versionPatch")

-tf [string]
	Timestamp output format (default "060102150405")

-tn [string]
	Timestamp var/const name (default "versionTimestamp")

Usage:

Before:

// version.go

package main

const versionMajor = "1"
const versionMinor = "0"
const versionPatch = "0"
const versionTimestamp = ""

const version = versionMajor + "." + versionMinor + "." + versionPatch

Command:

./go-aib -fn version.go

After:

// version.go

package main

const versionMajor = "1"
const versionMinor = "0"
const versionPatch = "1"
const versionTimestamp = "201005155147"

const version = versionMajor + "." + versionMinor + "." + versionPatch

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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