mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Migrate from goxc to goreleaser, closes #64
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -28,9 +28,6 @@ _testmain.go
|
|||||||
# our binaries
|
# our binaries
|
||||||
/inbucket
|
/inbucket
|
||||||
/inbucket.exe
|
/inbucket.exe
|
||||||
/target/**
|
/dist/**
|
||||||
/cmd/client/client
|
/cmd/client/client
|
||||||
/cmd/client/client.exe
|
/cmd/client/client.exe
|
||||||
|
|
||||||
# local goxc config
|
|
||||||
.goxc.local.json
|
|
||||||
|
|||||||
60
.goreleaser.yml
Normal file
60
.goreleaser.yml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
project_name: inbucket
|
||||||
|
release:
|
||||||
|
github:
|
||||||
|
owner: jhillyerd
|
||||||
|
name: inbucket
|
||||||
|
name_template: '{{.Tag}}'
|
||||||
|
brew:
|
||||||
|
commit_author:
|
||||||
|
name: goreleaserbot
|
||||||
|
email: goreleaser@carlosbecker.com
|
||||||
|
install: bin.install ""
|
||||||
|
builds:
|
||||||
|
- binary: inbucket
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- freebsd
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
main: .
|
||||||
|
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
|
- binary: client
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- freebsd
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
main: ./cmd/client
|
||||||
|
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
||||||
|
archive:
|
||||||
|
format: tar.gz
|
||||||
|
wrap_in_directory: true
|
||||||
|
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{
|
||||||
|
.Arm }}{{ end }}'
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
|
files:
|
||||||
|
- LICENSE*
|
||||||
|
- README*
|
||||||
|
- CHANGELOG*
|
||||||
|
- inbucket.bat
|
||||||
|
- etc/**/*
|
||||||
|
- themes/**/*
|
||||||
|
fpm:
|
||||||
|
bindir: /usr/local/bin
|
||||||
|
snapshot:
|
||||||
|
name_template: SNAPSHOT-{{ .Commit }}
|
||||||
|
checksum:
|
||||||
|
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
||||||
|
dist: dist
|
||||||
|
sign:
|
||||||
|
artifacts: none
|
||||||
18
.goxc.json
18
.goxc.json
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"ArtifactsDest": "target",
|
|
||||||
"TasksExclude": [
|
|
||||||
"pkg-build"
|
|
||||||
],
|
|
||||||
"Arch": "amd64",
|
|
||||||
"Os": "darwin freebsd linux windows",
|
|
||||||
"ResourcesInclude": "README*,LICENSE*,CHANGELOG*,inbucket.bat,etc,themes",
|
|
||||||
"PackageVersion": "1.2.0",
|
|
||||||
"PrereleaseInfo": "rc2",
|
|
||||||
"ConfigVersion": "0.9",
|
|
||||||
"BuildSettings": {
|
|
||||||
"LdFlagsXVars": {
|
|
||||||
"TimeNow": "main.BUILDDATE",
|
|
||||||
"Version": "main.VERSION"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,3 +9,6 @@ go:
|
|||||||
- 1.9.2
|
- 1.9.2
|
||||||
|
|
||||||
script: go test -race -v ./...
|
script: go test -race -v ./...
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -108,12 +108,11 @@ Release Checklist
|
|||||||
- Ensure *Unreleased* section is up to date
|
- Ensure *Unreleased* section is up to date
|
||||||
- Rename *Unreleased* section to release name and date.
|
- Rename *Unreleased* section to release name and date.
|
||||||
- Add new GitHub `/compare` link
|
- Add new GitHub `/compare` link
|
||||||
3. Update goxc version info: `goxc -wc -pv=1.x.0 -pr=rc1`
|
3. Run tests
|
||||||
4. Run: `goxc interpolate-source` to update VERSION var
|
4. Test cross-compile: `goreleaser --snapshot`
|
||||||
5. Run tests
|
5. Commit changes and merge release: `git flow release finish`
|
||||||
6. Test cross-compile: `goxc`
|
6. Push tags and wait for https://travis-ci.org/jhillyerd/inbucket build to
|
||||||
7. Commit changes and merge release: `git flow release finish 1.x.0`
|
complete
|
||||||
8. Upload to bintray: `goxc bintray`
|
7. Update `binary_versions` option in `inbucket-site/_config.yml`
|
||||||
9. Update `binary_versions` option in `inbucket-site/_config.yml`
|
|
||||||
|
|
||||||
See http://keepachangelog.com/ for additional instructions on how to update this file.
|
See http://keepachangelog.com/ for additional instructions on how to update this file.
|
||||||
|
|||||||
12
inbucket.go
12
inbucket.go
@@ -23,11 +23,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// VERSION contains the build version number, populated during linking by goxc
|
// version contains the build version number, populated during linking
|
||||||
VERSION = "1.2.0-rc2"
|
version = "undefined"
|
||||||
|
|
||||||
// BUILDDATE contains the build date, populated during linking by goxc
|
// date contains the build date, populated during linking
|
||||||
BUILDDATE = "undefined"
|
date = "undefined"
|
||||||
|
|
||||||
// Command line flags
|
// Command line flags
|
||||||
help = flag.Bool("help", false, "Displays this help")
|
help = flag.Bool("help", false, "Displays this help")
|
||||||
@@ -61,8 +61,8 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
config.Version = VERSION
|
config.Version = version
|
||||||
config.BuildDate = BUILDDATE
|
config.BuildDate = date
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *help {
|
if *help {
|
||||||
|
|||||||
Reference in New Issue
Block a user