auto update StaticResourceVersion when starting
This commit is contained in:
parent
be8fc6fb33
commit
b8cba6f400
|
@ -22,6 +22,7 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
@ -316,6 +317,7 @@ func Load(confPath, confIP, confPort, confServer, confChannel string, confDocker
|
||||||
|
|
||||||
// Static Server
|
// Static Server
|
||||||
Wide.StaticServer = strings.Replace(Wide.StaticServer, "{IP}", Wide.IP, 1)
|
Wide.StaticServer = strings.Replace(Wide.StaticServer, "{IP}", Wide.IP, 1)
|
||||||
|
Wide.StaticResourceVersion = strings.Replace(Wide.StaticResourceVersion, "${time}", strconv.FormatInt(time.Now().UnixNano(), 10), 1)
|
||||||
|
|
||||||
// Channels
|
// Channels
|
||||||
Wide.EditorChannel = strings.Replace(Wide.EditorChannel, "{IP}", Wide.IP, 1)
|
Wide.EditorChannel = strings.Replace(Wide.EditorChannel, "{IP}", Wide.IP, 1)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"ShellChannel": "ws://{IP}:{Port}",
|
"ShellChannel": "ws://{IP}:{Port}",
|
||||||
"SessionChannel": "ws://{IP}:{Port}",
|
"SessionChannel": "ws://{IP}:{Port}",
|
||||||
"HTTPSessionMaxAge": 86400,
|
"HTTPSessionMaxAge": 86400,
|
||||||
"StaticResourceVersion": "201411171800",
|
"StaticResourceVersion": "${time}",
|
||||||
"MaxProcs": 4,
|
"MaxProcs": 4,
|
||||||
"RuntimeMode": "dev",
|
"RuntimeMode": "dev",
|
||||||
"WD": "${pwd}",
|
"WD": "${pwd}",
|
||||||
|
|
Loading…
Reference in New Issue