Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pacedotdev/oto
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.0
Choose a base ref
...
head repository: pacedotdev/oto
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.1
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Aug 13, 2020

  1. updated releasing

    matryer committed Aug 13, 2020
    Copy the full SHA
    0722814 View commit details
Showing with 68 additions and 1 deletion.
  1. +32 −0 .goreleaser.yml
  2. +4 −0 Makefile
  3. +4 −1 main.go
  4. +28 −0 releasing.md
32 changes: 32 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm
- arm64
ldflags:
- -X main.Version={{.Version}}
archives:
- replacements:
darwin: macOS
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: release

release:
goreleaser --rm-dist
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -14,6 +14,9 @@ import (
"github.com/pkg/errors"
)

// Version is set during build.
var Version = "dev"

func main() {
if err := run(os.Stdout, os.Args); err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
@@ -24,7 +27,7 @@ func main() {
func run(stdout io.Writer, args []string) error {
flags := flag.NewFlagSet(args[0], flag.ContinueOnError)
flags.Usage = func() {
fmt.Println(args[0] + ` usage:
fmt.Println(args[0] + " " + Version + ` usage:
oto [flags] paths [[path2] [path3]...]`)
fmt.Println(`
flags:`)
28 changes: 28 additions & 0 deletions releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Releasing

This tool uses Go Releaser to manage release builds.

## Setup

Install Go Releaser.

```bash
brew install goreleaser/tap/goreleaser
```

* Make a [New personal access token on GitHub](https://github.com/settings/tokens/new) and set it as the `GITHUB_TOKEN` environment variable

## Releasing

Tag the repo:

```bash
$ git tag -a v0.1.0 -m "release tag."
$ git push origin v0.1.0
```

Then:

```bash
make release
```