Skip to content

Commit

Permalink
new release version control
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang committed Aug 1, 2019
1 parent f5cddba commit 428a812
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .dotam/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

var RELEASE_VERSION = "{{version}}"
41 changes: 5 additions & 36 deletions Dotamfile.hcl
Original file line number Diff line number Diff line change
@@ -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}}"
Expand All @@ -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"
}

5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
3 changes: 3 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

var RELEASE_VERSION = "v0.1.44-beta"

0 comments on commit 428a812

Please sign in to comment.