gorelease

command module
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: ISC Imports: 14 Imported by: 0

README

license CI Go Report Card GitHub tag

Go Release!

A simple program to handle GitHub releases for Go repositories.

Get

go get github.com/nwillc/gorelease

Setup

Your repository should contain the following:

.version
LICENSE.md (Optional)

Your Semantic Version

The .version file should contain the semantic version tag you want to use, for example v0.1.0.

Your Code License

This file (LICENSE.md or LICENSE) is optional, if present the text it contains will be used as a comment in the version.go files generated.

Use

Assuming you've set up as above.

  1. Commit your code in preparation for release.
  2. Update the .version file with a new version number.
  3. Run gorelease

This will:

  1. generate a new gen/version/version.go
  2. Create a tag with the version in .version
  3. push the tag
  4. push the repository

If the push fails due to credential issues it will inform you how to do the push manually.

Using the version in your code

This program will generate a gen/version/version.go file like the one in this repo. You can reference version.Version in your code to access the version tag of the current release.

Options

Usage of gorelease:
  -dirty
    	Allow dirty repository with uncommitted files.
  -dry-run
    	Perform a dry run, no files changed or tags/files pushed.
  -output string
    	Where to put the output version.go file (default "gen/version/version.go")
  -version
    	Display version.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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