From 428a81283a08f57da47949b19aa55229a9516433 Mon Sep 17 00:00:00 2001 From: yuyang Date: Thu, 1 Aug 2019 11:22:07 +0800 Subject: [PATCH] new release version control --- .dotam/version.go | 3 +++ Dotamfile.hcl | 41 +++++------------------------------------ main.go | 5 +++-- version.go | 3 +++ 4 files changed, 14 insertions(+), 38 deletions(-) create mode 100644 .dotam/version.go create mode 100644 version.go diff --git a/.dotam/version.go b/.dotam/version.go new file mode 100644 index 0000000..2b2ddee --- /dev/null +++ b/.dotam/version.go @@ -0,0 +1,3 @@ +package main + +var RELEASE_VERSION = "{{version}}" diff --git a/Dotamfile.hcl b/Dotamfile.hcl index 84ddcc6..235f7d6 100644 --- a/Dotamfile.hcl +++ b/Dotamfile.hcl @@ -1,24 +1,16 @@ -temp "Tempfile" { - src = "example/.dotam/Tempfile" - dest = "." - var { - data = "{{data.temp|safe}}" - } +var "versions" { + prod = "v0.1.1" + release = "v0.1.44-beta" } -temp "RELEASE" { - src = ".dotam/RELEASE" +temp "version.go" { + src = ".dotam/version.go" dest = "." var { version = "{{versions.release}}" } } -git "dev" { - add_type = "u" - commit = "" -} - docker { repo = "deoops/dotam" tag = "{{versions.prod}}" @@ -27,29 +19,6 @@ git "dev" { username = "{{_args.reg_user}}" password = "{{_args.reg_pass}}" } - - caporal { - host = "http://cd.wegeek.fun" - name = "dotam" - opts { - publish = ["8080:8080"] - mount = [ - { - bind = "/tmp/foo:/tmp/foo" - type = "bind" - } - ] - - } - } } -var "data" { - temp = "foo" -} - -var "versions" { - prod = "v0.1.1" - release = "v0.1.3-beta" -} diff --git a/main.go b/main.go index 8846c34..9790d3d 100644 --- a/main.go +++ b/main.go @@ -8,10 +8,11 @@ import ( ) var CWD string -var RELEASE_VERSION []byte + +//var RELEASE_VERSION []byte func init() { - RELEASE_VERSION = []byte(`0.1.42-beta`) + //RELEASE_VERSION = []byte(`0.1.42-beta`) CWD, _ = os.Getwd() initLogLevel() } diff --git a/version.go b/version.go new file mode 100644 index 0000000..ca016e1 --- /dev/null +++ b/version.go @@ -0,0 +1,3 @@ +package main + +var RELEASE_VERSION = "v0.1.44-beta"