From 34cd3c419696527f199ae55b1f8e78bd21b01008 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 9 Apr 2017 10:22:09 -0300 Subject: [PATCH 1/2] fixed ldflags time format --- main.go | 2 +- pipeline/build/ldflags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8410a7173..062017d34 100644 --- a/main.go +++ b/main.go @@ -69,11 +69,11 @@ func main() { func pipes(buildOnly bool) []pipeline.Pipe { var pipes = []pipeline.Pipe{ defaults.Pipe{}, // load default configs + git.Pipe{}, // get current tag info } if !buildOnly { pipes = append( pipes, - git.Pipe{}, // get current tag info env.Pipe{}, // load and validate environment variables source.Pipe{}, // validate current git state ) diff --git a/pipeline/build/ldflags.go b/pipeline/build/ldflags.go index b147678af..51921b98e 100644 --- a/pipeline/build/ldflags.go +++ b/pipeline/build/ldflags.go @@ -18,7 +18,7 @@ func ldflags(ctx *context.Context) (string, error) { var data = ldflagsData{ Commit: ctx.Git.Commit, Version: ctx.Git.CurrentTag, - Date: time.Now().Format("2006-01-02_15:04:05"), + Date: time.Now().UTC().Format(time.RFC3339), } var out bytes.Buffer t, err := template.New("ldflags").Parse(ctx.Config.Build.Ldflags) From 6e1ef5373a7d9ebf882318e7569082a3acb4362e Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sun, 9 Apr 2017 10:23:07 -0300 Subject: [PATCH 2/2] revert unwanted change --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 062017d34..8410a7173 100644 --- a/main.go +++ b/main.go @@ -69,11 +69,11 @@ func main() { func pipes(buildOnly bool) []pipeline.Pipe { var pipes = []pipeline.Pipe{ defaults.Pipe{}, // load default configs - git.Pipe{}, // get current tag info } if !buildOnly { pipes = append( pipes, + git.Pipe{}, // get current tag info env.Pipe{}, // load and validate environment variables source.Pipe{}, // validate current git state )