Skip to content

Commit

Permalink
Improve release pipeline and update changelog (ory#1341)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <[email protected]>
  • Loading branch information
aeneasr authored Apr 2, 2019
1 parent 55ddff2 commit 513afe0
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,13 @@ jobs:
name: Enable go1.12 modules
command: |
echo 'export GO111MODULE=on' >> $BASH_ENV
echo 'export DOCKER_FULL_TAG=$(echo $CIRCLE_TAG | tr '+' '_')' >> $BASH_ENV
source $BASH_ENV
- checkout
- setup_remote_docker
- run: docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
- run: cp ./.releaser/LICENSE.txt ./LICENSE.txt
- run: curl -sL https://git.io/goreleaser | bash
- run: docker tag oryd/hydra:latest oryd/hydra:$(echo $CIRCLE_TAG | tr '+' '_')
- run: docker push oryd/hydra:$(echo $CIRCLE_TAG | tr '+' '_')

workflows:
version: 2
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ before:
- go mod download
builds:
-
ldflags:
- -s -w -X main.Version={{.Tag}} -X main.Commit={{.FullCommit}} -X main.Date={{.Date}}
binary: hydra
env:
- CGO_ENABLED=0
Expand All @@ -24,10 +26,6 @@ builds:
goos:
- freebsd
- linux
# - plan9
# - solaris
# - netbsd
# - openbsd
- windows
- darwin
archive:
Expand Down Expand Up @@ -68,6 +66,8 @@ dockers:
- image_templates:
- "oryd/hydra:v{{ .Major }}"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}"
- "oryd/hydra:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "oryd/hydra:{{ .Env.DOCKER_FULL_TAG }}"
- "oryd/hydra:latest"
extra_files:
- .releaser/LICENSE.txt
14 changes: 13 additions & 1 deletion UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@ before finalizing the upgrade process.
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Hassle-free upgrades](#hassle-free-upgrades)
- [1.0.0-rc.7](#100-rc7)
- [Configuration changes](#configuration-changes)
- [System secret rotation](#system-secret-rotation)
- [Database Plugins](#database-plugins)
- [1.0.0-rc.4](#100-rc4)
- [1.0.0-rc.1](#100-rc1)
- [Schema Changes](#schema-changes)
- [Foreign Keys](#foreign-keys)
- [Removing inconsistent oauth2 data](#removing-inconsistent-oauth2-data)
- [Removing inconsistent login & consent data](#removing-inconsistent-login--consent-data)
- [Indices](#indices)
- [Non-breaking Changes](#non-breaking-changes)
- [Access Token Audience](#access-token-audience)
- [Refresh Grant](#refresh-grant)
- [Customise login and consent flow timeout](#customise-login-and-consent-flow-timeout)
- [Schema Changes](#schema-changes)
- [Breaking Changes](#breaking-changes)
- [Refresh Token Expiry](#refresh-token-expiry)
- [Swagger & SDK Restructuring](#swagger--sdk-restructuring)
- [Go](#go)
- [Others](#others)
- [JSON Web Token formatted Access Token data](#json-web-token-formatted-access-token-data)
- [CLI Changes](#cli-changes)
- [API Changes](#api-changes)
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (
var cfgFile string

var (
version = "master"
date = "undefined"
commit = "undefined"
Version = "master"
Date = "undefined"
Commit = "undefined"
)

// This represents the base command when called without any subcommands
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var serveControls = `## Configuration
ORY Hydra can be configured using environment variables as well as a configuration file. For more information
on configuration options, open the configuration documentation:
>> https://github.com/ory/hydra/blob/` + version + `/docs/config.yaml <<
>> https://github.com/ory/hydra/blob/` + Version + `/docs/config.yaml <<
`

// serveCmd represents the host command
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ This command does not work with the "memory" database. Both services (administra
connection to be able to synchronize.
` + serveControls,
Run: server.RunServeAdmin(version, commit, date),
Run: server.RunServeAdmin(Version, Commit, Date),
}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ All possible controls are listed below. This command exposes exposes command lin
the controls section.
` + serveControls,
Run: server.RunServeAll(version, commit, date),
Run: server.RunServeAll(Version, Commit, Date),
}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve_public.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This command does not work with the "memory" database. Both services (privileged
connection to be able to synchronize.
` + serveControls,
Run: server.RunServePublic(version, commit, date),
Run: server.RunServePublic(Version, Commit, Date),
}

func init() {
Expand Down
6 changes: 3 additions & 3 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Display this binary's version, build time and git hash of this build",
Run: func(cmd *cobra.Command, args []string) {
fmt.Printf("Version: %s\n", version)
fmt.Printf("Git Hash: %s\n", commit)
fmt.Printf("Build Time: %s\n", date)
fmt.Printf("Version: %s\n", Version)
fmt.Printf("Git Hash: %s\n", Commit)
fmt.Printf("Build Time: %s\n", Date)
},
}

Expand Down

0 comments on commit 513afe0

Please sign in to comment.