Skip to content

Commit

Permalink
improve release process
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Mar 9, 2018
1 parent cb97ca5 commit 68c76e0
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ build: hooks ## build and lint misspell
test: ## run all tests
go test .

# real publishing is done only by travis
publish: ## test goreleaser
./scripts/goreleaser-dryrun.sh

# the grep in line 2 is to remove misspellings in the spelling dictionary
# that trigger false positives!!
falsepositives: /scowl-wl
Expand Down
17 changes: 11 additions & 6 deletions RELEASE-HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ since I forget.

1. Review existing tags and pick new release number

```bash
```sh
git tag
```

2. Tag locally

```bash
```sh
git tag -a v0.1.0 -m "First release"
```

If things get screwed up, delete the tag with

```sh
git tag -d v0.1.0
```

3. Test goreleaser

TODO: how to install goreleaser

```
goreleaser --skip-publish
```sh
./scripts/goreleaser-dryrun.sh
```

4. Push
Expand All @@ -29,5 +35,4 @@ since I forget.
git push origin v0.1.0
```

5. Verify release and edit notes. See https://github.com/client9/misspell/releases
5. Verify release and edit notes. See https://github.com/client9/misspell/releases
1 change: 1 addition & 0 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ archive:
386: 32bit
darwin: mac
files:
- none

checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
Expand Down
7 changes: 7 additions & 0 deletions scripts/goreleaser-dryrun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
echo "Real publishing is done by travis-ci"

set -ex
echo "TAG:= $(git tag | tail -1)"
rm -rf ./dist
goreleaser --skip-publish

0 comments on commit 68c76e0

Please sign in to comment.