Skip to content

newreleasesio/cli-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NewReleases

Go NewReleases

A command line client for managing NewReleases projects.

Installation

NewReleases client binaries have no external dependencies and can be just copied and executed locally.

Binary downloads of the NewReleases client can be found on the Releases page.

To install on macOS:

wget https://github.com/newreleasesio/cli-go/releases/latest/download/newreleases-darwin-amd64 -O /usr/local/bin/newreleases
chmod +x /usr/local/bin/newreleases

You may need additional privileges to write to /usr/local/bin, but the file can be saved at any location that you want.

Supported operating systems and architectures:

  • macOS ARM 64bit darwin-arm64
  • macOS 64bit darwin-amd64
  • Linux 64bit linux-amd64
  • Linux 32bit linux-386
  • Linux ARM 64bit linux-arm64
  • Linux ARM 32bit linux-armv6
  • Windows 64bit windows-amd64
  • Windows ARM 64bit windows-arm64
  • Windows 32bit windows-386

Deb and RPM packages are also built.

This tool is implemented using the Go programming language and can be also installed by issuing a go get command:

go get -u newreleases.io/cmd/newreleases

Homebrew

A convenience installation for macOS and Linux users.

brew install newreleasesio/cmd/newreleases

Configuration

This tool needs to authenticate to NewReleases API using a secret Auth Key that can be generated on the service settings web pages.

The key can be stored permanently by issuing interactive commands:

newreleases configure

or

newreleases get-auth-key

or it can be provided as the command line argument flag --auth-key on every newreleases command execution.

Usage

Getting help

NewReleases client and its commands have help pages associated with them that can be printed out with -h flag:

newreleases -h
newreleases get-auth-key -h
newreleases project add -h

Working with projects

The base command for getting projects is project and it shows available sub-commands which are list, search, get, add, update and remove.

List projects

Listing all added projects is paginated and a page can be specified with --page (short -p) flag:

newreleases project list
newreleases project list -p 2

Project can be filtered by provider:

newreleases project list --provider github

and the order can be specified with --order flag which can have values updated, added or name:

newreleases project list --order name

Projects can be searched by name with:

newreleases project search go

where go is the example of a search string.

Search projects

Search results can be filtered by provider, just as listing can be with --provider flag:

newreleases project search go --provider github

Get a project

Information about a specific project can be retrieved with:

newreleases project get github golang/go

or by a project id:

newreleases project get mdsbe60td5gwgzetyksdfeyxt4

Add new project to track

A project can be added with:

newreleases project add github golang/go

But there is a number of options that can be set, as by default, none of the notifications are enabled.

To enable emailing:

newreleases project add github golang/go --email daily

Or to add Slack notifications as well, but exclude pre-releases:

newreleases project add github golang/go --email daily --slack td5gwxt4mdsbe6gzetyksdfey0 --exclude-prereleases

More details about options can be found on add sub-command help page:

newreleases project add -h

Update project options

Updating a project options is also possible. It contains the same options as the add command with additional flags to remove some of them. More information about options can be found on update sub-command help page:

newreleases project update -h

It is important that only specified options will be changed. For example, specifying different Slack channels will not remove already set other options like Telegram or Email or exclusions.

newreleases project update github golang/go --slack td5gwxt4mdsbe6gzetyksdfey0

Remove a project

To remove the project from tracking its releases:

newreleases project remove github golang/go

or by a project id:

newreleases project remove mdsbe60td5gwgzetyksdfeyxt4

Getting releases

The base command for getting releases is release and it shows available sub-commands which are list, get, and note.

List releases of a project

To list all releases in chronological order of one project:

newreleases release list github golang/go

where the first argument after list is the provider and the second one is the project name.

or by project id:

newreleases release list mdsbe60td5gwgzetyksdfeyxt4

where the only argument after list is the project ID.

Results are paginated and the requested page can be specified with --page (short -p) flag.

newreleases release list github golang/go -p 2

Get a release information

To get information about only one release, there is the get sub-command:

newreleases release get github golang/go go1.13.5
newreleases release get mdsbe60td5gwgzetyksdfeyxt4 go1.13.5

Get the latest non-excluded project release information

To get information about only one release, there is the get-latest sub-command:

newreleases release get github golang/go
newreleases release get mdsbe60td5gwgzetyksdfeyxt4

Get a release note

To get a release note about a release, there is the note sub-command:

newreleases release note npm vue 2.6.11
newreleases release note gzetyksdfeyxt4mdsbe60td5gw 2.6.11

Listing providers

NewReleases supports a number of clients and they can be listed with:

newreleases providers

To list only providers that you have project added from:

newreleases providers --added

This information can be useful when filtering projects by a provider.

Listing available notification channels

Notification channels can be managed only over the service's web interface. With NewReleases CLI client, they can be listed to relate their IDs from the output from other commands with their names. Available commands:

newreleases slack
newreleases telegram
newreleases discord
newreleases hangouts-chat
newreleases microsoft-teams
newreleases mattermost
newreleases rocketchat
newreleases matrix
newreleases webhook

Working with tags

The base command for getting tags is tag and it shows available sub-commands which are list, get, add, update and remove.

List tags

Listing all tags:

newreleases tag list

Get a tag

Information about a specific tag can be retrieved with:

newreleases tag get 33f1db7254b9

Add new tag

A tag can be added with specifying its name:

newreleases tag add Awesome

Update tag name

To change a tag name, it should be referenced by its ID and a new name should be specified.

newreleases tag update 33f1db7254b9 --name Cool

Remove a tag

Tag is removed by its ID:

newreleases tag remove 33f1db7254b9

Versioning

To see the current version of the binary, execute:

newreleases version

Each version is tagged and the version is updated accordingly in version.go file.

Contributing

We love pull requests! Please see the contribution guidelines.

License

This application is distributed under the BSD-style license found in the LICENSE file.