move things slightly and make version and gitSha constants.
parent
d7e75135a7
commit
e283914d80
|
@ -95,7 +95,7 @@ function build_packages {
|
||||||
function setup_version {
|
function setup_version {
|
||||||
echo "Changing version from dev to $influxdb_version"
|
echo "Changing version from dev to $influxdb_version"
|
||||||
sha1=`git rev-list --max-count=1 HEAD`
|
sha1=`git rev-list --max-count=1 HEAD`
|
||||||
sed -i.bak -e "s/var version = \"dev\"/var version = \"$influxdb_version\"/" -e "s/var gitSha = \"\"/var gitSha = \"$sha1\"/" src/server/server.go
|
sed -i.bak -e "s/version = \"dev\"/version = \"$influxdb_version\"/" -e "s/gitSha = \"\"/gitSha = \"$sha1\"/" src/server/server.go
|
||||||
sed -i.bak -e "s/REPLACE_VERSION/$influxdb_version/" scripts/post_install.sh
|
sed -i.bak -e "s/REPLACE_VERSION/$influxdb_version/" scripts/post_install.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,16 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fileName = flag.String("config", "config.json.sample", "Config file")
|
const (
|
||||||
var wantsVersion = flag.Bool("version", false, "Get version number")
|
version = "dev"
|
||||||
var pidFile = flag.String("pidfile", "", "the pid file")
|
gitSha = ""
|
||||||
|
)
|
||||||
var version = "dev"
|
|
||||||
var gitSha = ""
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fileName := flag.String("config", "config.json.sample", "Config file")
|
||||||
|
wantsVersion := flag.Bool("version", false, "Get version number")
|
||||||
|
pidFile := flag.String("pidfile", "", "the pid file")
|
||||||
|
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue