From 0f67e51e561ae733f048b23c805271b906098cad Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sun, 17 Dec 2017 21:05:48 -0800 Subject: [PATCH 1/7] Fix version & date in Docker containers for #64 --- etc/docker/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/docker/install.sh b/etc/docker/install.sh index 10a1a2b..036de83 100755 --- a/etc/docker/install.sh +++ b/etc/docker/install.sh @@ -15,11 +15,12 @@ apk add --no-cache --virtual .build-deps git # Setup export GOBIN="$bindir" -builddate="$(date -Iseconds)" cd "$srcdir" -go clean +builddate="$(date -Iseconds)" +buildver="$(git describe --tags)" # Build +go clean echo "### Fetching Dependencies" go get -t -v ./... @@ -27,7 +28,7 @@ echo "### Testing Inbucket" go test ./... echo "### Building Inbucket" -go build -o inbucket -ldflags "-X 'main.BUILDDATE=$builddate'" -v . +go build -o inbucket -ldflags "-X 'main.version=$buildver' -X 'main.date=$builddate'" -v . echo "### Installing Inbucket" set -x From 28b40eb94d4759f2eda0621b6fbb058ecf0b8612 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sun, 17 Dec 2017 21:29:57 -0800 Subject: [PATCH 2/7] Fetch tags during docker build --- etc/docker/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/docker/install.sh b/etc/docker/install.sh index 036de83..f13ed94 100755 --- a/etc/docker/install.sh +++ b/etc/docker/install.sh @@ -16,6 +16,7 @@ apk add --no-cache --virtual .build-deps git # Setup export GOBIN="$bindir" cd "$srcdir" +git fetch -t builddate="$(date -Iseconds)" buildver="$(git describe --tags)" From f4fadd7e440827b2c0ba6e471ce089ef51b468b4 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sun, 17 Dec 2017 21:43:46 -0800 Subject: [PATCH 3/7] Docker version will now fall back to commit if no tag --- etc/docker/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/docker/install.sh b/etc/docker/install.sh index f13ed94..916c745 100755 --- a/etc/docker/install.sh +++ b/etc/docker/install.sh @@ -16,9 +16,10 @@ apk add --no-cache --virtual .build-deps git # Setup export GOBIN="$bindir" cd "$srcdir" +# Fetch tags for describe git fetch -t builddate="$(date -Iseconds)" -buildver="$(git describe --tags)" +buildver="$(git describe --tags --always)" # Build go clean From b28e1d86d8ba39deebf0ddfcf14250cbc80afb9b Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Mon, 18 Dec 2017 19:15:51 -0800 Subject: [PATCH 4/7] Include version for final goxc release --- inbucket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inbucket.go b/inbucket.go index 5d1c5ac..59a22b2 100644 --- a/inbucket.go +++ b/inbucket.go @@ -24,7 +24,7 @@ import ( var ( // version contains the build version number, populated during linking - version = "undefined" + version = "1.2.0-rc2" // date contains the build date, populated during linking date = "undefined" From de75b778c06df04200d036433c69f8a1f254c59b Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Sun, 24 Dec 2017 13:37:47 -0800 Subject: [PATCH 5/7] Only deploy with one version of Go --- .travis.yml | 15 +++++++++++---- etc/travis-deploy.sh | 10 ++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 etc/travis-deploy.sh diff --git a/.travis.yml b/.travis.yml index a407e1f..59d36e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,21 @@ language: go sudo: false +env: + - DEPLOY_WITH_MAJOR="1.9" + before_script: - go vet ./... go: - - 1.8.5 - - 1.9.2 + - 1.8.x + - 1.9.x script: go test -race -v ./... -after_success: - - test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash +deploy: + provider: script + script: etc/travis-deploy.sh + on: + tags: true + branch: master diff --git a/etc/travis-deploy.sh b/etc/travis-deploy.sh new file mode 100755 index 0000000..e93c363 --- /dev/null +++ b/etc/travis-deploy.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# travis-deploy.sh +# description: Trigger goreleaser deployment in correct build scenarios + +set -eo pipefail +set -x + +if [[ "$TRAVIS_GO_VERSION" == "$DEPLOY_WITH_MAJOR."* ]]; then + curl -sL https://git.io/goreleaser | bash +fi From 01d51302c4ddcefb6d7539b2033a9cdb8e6ffd2b Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Wed, 27 Dec 2017 13:18:11 -0800 Subject: [PATCH 6/7] Prepare release 1.2.0 --- .goxc.json | 3 +-- CHANGELOG.md | 8 ++++++++ inbucket.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.goxc.json b/.goxc.json index b78010a..78f24d2 100644 --- a/.goxc.json +++ b/.goxc.json @@ -7,7 +7,6 @@ "Os": "darwin freebsd linux windows", "ResourcesInclude": "README*,LICENSE*,CHANGELOG*,inbucket.bat,etc,themes", "PackageVersion": "1.2.0", - "PrereleaseInfo": "rc2", "ConfigVersion": "0.9", "BuildSettings": { "LdFlagsXVars": { @@ -15,4 +14,4 @@ "Version": "main.VERSION" } } -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f2972f..d50e215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +[1.2.0] - 2017-12-27 +-------------------- + +### Changed + +- No significant code changes from rc2 + [1.2.0-rc2] - 2017-12-15 ------------------------ @@ -92,6 +99,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). specific message. [Unreleased]: https://github.com/jhillyerd/inbucket/compare/master...develop +[1.2.0]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc2...1.2.0 [1.2.0-rc2]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc1...1.2.0-rc2 [1.2.0-rc1]: https://github.com/jhillyerd/inbucket/compare/1.1.0...1.2.0-rc1 [1.1.0]: https://github.com/jhillyerd/inbucket/compare/1.1.0-rc2...1.1.0 diff --git a/inbucket.go b/inbucket.go index 59a22b2..eea845f 100644 --- a/inbucket.go +++ b/inbucket.go @@ -24,7 +24,7 @@ import ( var ( // version contains the build version number, populated during linking - version = "1.2.0-rc2" + version = "1.2.0" // date contains the build date, populated during linking date = "undefined" From 1ff8ffe9bd80d046c0c150793b0aac34d135f894 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Wed, 28 Feb 2018 12:50:39 -0800 Subject: [PATCH 7/7] Release prep for 1.3.0 --- CHANGELOG.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d953fef..922be06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased] +## [v1.3.0] - 2018-02-28 ### Added - Button to purge mailbox contents from the UI. @@ -13,12 +13,12 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Reverse message display sort order in the UI; now newest first. -## [1.2.0] - 2017-12-27 +## [v1.2.0] - 2017-12-27 ### Changed - No significant code changes from rc2 -## [1.2.0-rc2] - 2017-12-15 +## [v1.2.0-rc2] - 2017-12-15 ### Added - `rest/client` types `MessageHeader` and `Message` with convenience methods; @@ -33,7 +33,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). types - Fixed panic when `monitor.history` set to 0 -## [1.2.0-rc1] - 2017-01-29 +## [v1.2.0-rc1] - 2017-01-29 ### Added - Storage of `To:` header in messages (likely breaks existing datastores) @@ -59,7 +59,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Allow increased local-part length of 128 chars for Mailgun - RedHat and Ubuntu now use systemd instead of legacy init systems -## [1.1.0] - 2016-09-03 +## [v1.1.0] - 2016-09-03 ### Added - Homebrew inbucket.conf and formula (see README) @@ -67,7 +67,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Log and continue when unable to delete oldest message during cap enforcement -## [1.1.0-rc2] - 2016-03-06 +## [v1.1.0-rc2] - 2016-03-06 ### Added - Message Cap to status page @@ -77,7 +77,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Shutdown hang in retention scanner - Display empty subject as `(No Subject)` -## [1.1.0-rc1] - 2016-03-04 +## [v1.1.0-rc1] - 2016-03-04 ### Added - Inbucket now builds with Go 1.5 or 1.6 @@ -91,7 +91,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - RESTful API moved to `/api/v1` base URI - More graceful shutdown on Ctrl-C or when errors encountered -## [1.0] - 2014-04-14 +## [v1.0] - 2014-04-14 ### Added - Add new configuration option `mailbox.message.cap` to prevent individual @@ -99,23 +99,24 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add Link button to messages, allows for directing another person to a specific message. -[Unreleased]: https://github.com/jhillyerd/inbucket/compare/master...develop -[1.2.0]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc2...1.2.0 -[1.2.0-rc2]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc1...1.2.0-rc2 -[1.2.0-rc1]: https://github.com/jhillyerd/inbucket/compare/1.1.0...1.2.0-rc1 -[1.1.0]: https://github.com/jhillyerd/inbucket/compare/1.1.0-rc2...1.1.0 -[1.1.0-rc2]: https://github.com/jhillyerd/inbucket/compare/1.1.0-rc1...1.1.0-rc2 -[1.1.0-rc1]: https://github.com/jhillyerd/inbucket/compare/1.0...1.1.0-rc1 -[1.0]: https://github.com/jhillyerd/inbucket/compare/1.0-rc1...1.0 +[Unreleased]: https://github.com/jhillyerd/inbucket/compare/master...develop +[v1.3.0]: https://github.com/jhillyerd/inbucket/compare/1.2.0...1.3.0 +[v1.2.0]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc2...1.2.0 +[v1.2.0-rc2]: https://github.com/jhillyerd/inbucket/compare/1.2.0-rc1...1.2.0-rc2 +[v1.2.0-rc1]: https://github.com/jhillyerd/inbucket/compare/1.1.0...1.2.0-rc1 +[v1.1.0]: https://github.com/jhillyerd/inbucket/compare/1.1.0-rc2...1.1.0 +[v1.1.0-rc2]: https://github.com/jhillyerd/inbucket/compare/1.1.0-rc1...1.1.0-rc2 +[v1.1.0-rc1]: https://github.com/jhillyerd/inbucket/compare/1.0...1.1.0-rc1 +[v1.0]: https://github.com/jhillyerd/inbucket/compare/1.0-rc1...1.0 ## Release Checklist 1. Create release branch: `git flow release start 1.x.0` 2. Update CHANGELOG.md: - - Ensure *Unreleased* section is up to date - - Rename *Unreleased* section to release name and date. - - Add new GitHub `/compare` link + - Ensure *Unreleased* section is up to date + - Rename *Unreleased* section to release name and date. + - Add new GitHub `/compare` link 3. Run tests 4. Test cross-compile: `goreleaser --snapshot` 5. Commit changes and merge release: `git flow release finish`