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