mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
make binary paths consistent between dev/prod. add 'eval' as a rtnstate command. fix waveterm.lock file
This commit is contained in:
parent
876321d06d
commit
68731f45a2
@ -77,14 +77,14 @@ open out/Wave-darwin-x64/Wave.app
|
||||
```bash
|
||||
# @scripthaus command build-wavesrv
|
||||
cd wavesrv
|
||||
CGO_ENABLED=1 go build -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M')" -o bin/wavesrv ./cmd
|
||||
CGO_ENABLED=1 go build -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M')" -o ../bin/wavesrv ./cmd
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command build-waveshell
|
||||
cd waveshell
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
```
|
||||
|
||||
```bash
|
||||
@ -93,10 +93,10 @@ set -e
|
||||
cd waveshell
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
go build -ldflags="$GO_LDFLAGS" -o ~/.mshell/mshell-v0.2 main-waveshell.go
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-linux.amd64 main-waveshell.go
|
||||
GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-linux.arm64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.arm64 main-waveshell.go
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.amd64 main-waveshell.go
|
||||
GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-linux.arm64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.3-darwin.arm64 main-waveshell.go
|
||||
```
|
||||
|
||||
```bash
|
||||
|
@ -133,9 +133,6 @@ function getBaseHostPort() {
|
||||
}
|
||||
|
||||
function getWaveSrvPath() {
|
||||
if (isDev) {
|
||||
return path.join(getAppBasePath(), "wavesrv", "bin", "wavesrv");
|
||||
}
|
||||
return path.join(getAppBasePath(), "bin", "wavesrv");
|
||||
}
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
|
||||
```bash
|
||||
# @scripthaus command build
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command fullbuild
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
go build -ldflags="$GO_LDFLAGS" -o ~/.mshell/mshell-v0.2 main-waveshell.go
|
||||
GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-linux.amd64 main-waveshell.go
|
||||
GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-linux.arm64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.amd64 main-waveshell.go
|
||||
GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o bin/mshell-v0.3-darwin.arm64 main-waveshell.go
|
||||
```
|
||||
|
||||
|
@ -179,7 +179,7 @@ func setBracketArgs(argMap map[string]string, bracketStr string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var literalRtnStateCommands = []string{".", "source", "unset", "cd", "alias", "unalias", "deactivate"}
|
||||
var literalRtnStateCommands = []string{".", "source", "unset", "cd", "alias", "unalias", "deactivate", "eval"}
|
||||
|
||||
func getCallExprLitArg(callExpr *syntax.CallExpr, argNum int) string {
|
||||
if len(callExpr.Args) <= argNum {
|
||||
|
@ -75,9 +75,6 @@ func MShellBinaryDir() string {
|
||||
if appPath == "" {
|
||||
appPath = "."
|
||||
}
|
||||
if IsDevMode() {
|
||||
return path.Join(appPath, "waveshell", "bin")
|
||||
}
|
||||
return path.Join(appPath, "bin", "mshell")
|
||||
}
|
||||
|
||||
@ -159,7 +156,7 @@ func AcquireWaveLock() (*os.File, error) {
|
||||
return nil, fmt.Errorf("cannot find/create WAVETERM_HOME directory %q", homeDir)
|
||||
}
|
||||
lockFileName := path.Join(homeDir, WaveLockFile)
|
||||
fd, err := os.Create(lockFileName)
|
||||
fd, err := os.OpenFile(lockFileName, os.O_WRONLY|os.O_CREATE, 0600)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
# SH2 Server Commands
|
||||
|
||||
```bash
|
||||
# @scripthaus command dump-schema-dev
|
||||
sqlite3 ~/.waveterm-dev/waveterm.db .schema > db/schema.sql
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command opendb-dev
|
||||
sqlite3 ~/.waveterm-dev/waveterm.db
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command build
|
||||
go build -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M')" -o bin/wavesrv ./cmd
|
||||
```
|
Loading…
Reference in New Issue
Block a user