git-release

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 18 Imported by: 0

README

git-release

Go Report Card Build Status

Generate github release with changelog in a single command

Based on tcnksm/ghr

Install

Download binary from release page and place it in $PATH directory.

Or build yourself

$ go get -v -u github.com/zcong1993/git-release
$ cd $GOPATH/github.com/zcong1993/git-release
$ make build
# then place ./bin/rls in `$PATH` directory.

Usage

$ rls [option] TAG

TAG is required. TAG is the release tag. And must config github api token first.

GitHub API Token

To get token, first, visit GitHub account settings page, then go to Applications for the user. Here you can create a token in the Personal access tokens section. For a private repository you need repo scope and for a public repository you need public_repo scope.

When using ghr, you can set it via GITHUB_TOKEN env var, -token command line option or github.token property in .gitconfig file.

For instance, to set it via environmental variable:

$ export GITHUB_TOKEN="....."

Or set it in github.token in gitconfig:

$ git config --global github.token "....."

Note that environmental variable takes priority over gitconfig value.

GitHub Enterprise

You can use ghr for GitHub Enterprise. Change API endpoint via the enviromental variable.

$ export GITHUB_API=http://github.company.com/api/v3/
Options
$ rls \
    -t TOKEN \        # Set Github API Token
    -u USERNAME \     # Set Github username
    -r REPO \         # Set repository name
    -c COMMIT \       # Set target commitish, branch or commit SHA
    -delete \         # Delete release and its git tag in advance if it exists
    -draft \          # Release as draft (Unpublish)
    -prerelease \     # Crate prerelease
    TAG

License

MIT © zcong1993

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