2023-10-29 20:02:57 -07:00
|
|
|
# WaveTerm Commands
|
2022-06-07 17:25:35 -07:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# @scripthaus command webpack-watch
|
2022-07-09 01:37:19 -07:00
|
|
|
# @scripthaus cd :playbook
|
2023-10-25 13:32:15 -07:00
|
|
|
node_modules/.bin/webpack --env dev --watch
|
2022-06-07 17:25:35 -07:00
|
|
|
```
|
|
|
|
|
|
2022-11-01 00:07:25 -07:00
|
|
|
```bash
|
|
|
|
|
# @scripthaus command webpack-build
|
|
|
|
|
# @scripthaus cd :playbook
|
2023-10-25 13:32:15 -07:00
|
|
|
node_modules/.bin/webpack --env dev
|
2022-11-01 00:07:25 -07:00
|
|
|
```
|
|
|
|
|
|
2022-07-09 01:37:19 -07:00
|
|
|
```bash
|
2023-10-25 13:32:15 -07:00
|
|
|
# @scripthaus command webpack-build-prod
|
2022-07-09 01:37:19 -07:00
|
|
|
# @scripthaus cd :playbook
|
2023-10-25 13:32:15 -07:00
|
|
|
node_modules/.bin/webpack --env prod
|
2022-11-01 00:07:25 -07:00
|
|
|
```
|
|
|
|
|
|
2022-07-09 01:37:19 -07:00
|
|
|
```bash
|
|
|
|
|
# @scripthaus command electron-rebuild
|
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
|
node_modules/.bin/electron-rebuild
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# @scripthaus command electron
|
|
|
|
|
# @scripthaus cd :playbook
|
2023-12-15 22:20:03 -08:00
|
|
|
WAVETERM_DEV=1 PCLOUD_ENDPOINT="https://ot2e112zx5.execute-api.us-west-2.amazonaws.com/dev" PCLOUD_WS_ENDPOINT="wss://5lfzlg5crl.execute-api.us-west-2.amazonaws.com/dev/" node_modules/.bin/electron dist-dev/emain.js
|
2022-07-09 01:37:19 -07:00
|
|
|
```
|
|
|
|
|
|
2022-07-04 22:37:45 -07:00
|
|
|
```bash
|
|
|
|
|
# @scripthaus command typecheck
|
2022-07-09 01:37:19 -07:00
|
|
|
# @scripthaus cd :playbook
|
2023-11-29 18:27:31 -08:00
|
|
|
node_modules/.bin/tsc --noEmit
|
2022-07-04 22:37:45 -07:00
|
|
|
```
|
2022-10-31 14:59:31 -07:00
|
|
|
|
|
|
|
|
```bash
|
2022-11-01 00:07:25 -07:00
|
|
|
# @scripthaus command build-package
|
2022-10-31 14:59:31 -07:00
|
|
|
# @scripthaus cd :playbook
|
2022-11-01 21:18:40 -07:00
|
|
|
rm -rf dist/
|
|
|
|
|
rm -rf bin/
|
2022-12-28 13:29:18 -08:00
|
|
|
rm -rf build/
|
2023-10-25 13:32:15 -07:00
|
|
|
node_modules/.bin/webpack --env prod
|
2024-02-23 17:44:00 -08:00
|
|
|
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
2024-04-25 11:17:52 -07:00
|
|
|
WAVESHELL_VERSION=v0.7
|
2023-02-23 15:19:01 -08:00
|
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
2024-03-04 22:03:53 -08:00
|
|
|
function buildWaveShell {
|
|
|
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
|
|
|
|
|
}
|
|
|
|
|
function buildWaveSrv {
|
|
|
|
|
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M') -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
|
|
|
|
}
|
|
|
|
|
buildWaveShell darwin amd64
|
|
|
|
|
buildWaveShell darwin arm64
|
|
|
|
|
buildWaveShell linux amd64
|
|
|
|
|
buildWaveShell linux arm64
|
|
|
|
|
buildWaveSrv arm64
|
|
|
|
|
buildWaveSrv amd64
|
|
|
|
|
yarn run electron-builder -c electron-builder.config.js -m -p never
|
2022-10-31 14:59:31 -07:00
|
|
|
```
|
2022-11-01 21:18:40 -07:00
|
|
|
|
2023-10-18 05:54:07 +00:00
|
|
|
```bash
|
|
|
|
|
# @scripthaus command build-package-linux
|
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
|
rm -rf dist/
|
|
|
|
|
rm -rf bin/
|
|
|
|
|
rm -rf build/
|
2023-11-01 01:26:19 -07:00
|
|
|
node_modules/.bin/webpack --env prod
|
2024-02-23 17:44:00 -08:00
|
|
|
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
2024-04-25 11:17:52 -07:00
|
|
|
WAVESHELL_VERSION=v0.7
|
2023-10-18 05:54:07 +00:00
|
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
2024-03-04 22:03:53 -08:00
|
|
|
function buildWaveShell {
|
|
|
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
|
|
|
|
|
}
|
|
|
|
|
function buildWaveSrv {
|
|
|
|
|
# adds -extldflags=-static, *only* on linux (macos does not support fully static binaries) to avoid a glibc dependency
|
2024-09-17 16:29:26 -07:00
|
|
|
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netcgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
2024-03-04 22:03:53 -08:00
|
|
|
}
|
|
|
|
|
buildWaveShell darwin amd64
|
|
|
|
|
buildWaveShell darwin arm64
|
|
|
|
|
buildWaveShell linux amd64
|
|
|
|
|
buildWaveShell linux arm64
|
|
|
|
|
buildWaveSrv $GOARCH
|
|
|
|
|
yarn run electron-builder -c electron-builder.config.js -l -p never
|
2022-11-01 21:18:40 -07:00
|
|
|
```
|
2022-12-28 13:29:18 -08:00
|
|
|
|
2023-10-16 13:35:03 -07:00
|
|
|
```bash
|
|
|
|
|
# @scripthaus command build-wavesrv
|
2024-02-23 17:44:00 -08:00
|
|
|
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
2023-10-16 13:35:03 -07:00
|
|
|
cd wavesrv
|
2024-09-17 16:29:26 -07:00
|
|
|
CGO_ENABLED=1 go build -tags "osusergo,netcgo,sqlite_omit_load_extension" -ldflags "-X main.BuildTime=$(date +'%Y%m%d%H%M') -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv ./cmd
|
2023-10-16 13:35:03 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# @scripthaus command fullbuild-waveshell
|
2023-10-25 15:20:25 -07:00
|
|
|
set -e
|
2024-04-25 11:17:52 -07:00
|
|
|
WAVESHELL_VERSION=v0.7
|
2023-10-16 13:35:03 -07:00
|
|
|
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
2024-03-04 22:03:53 -08:00
|
|
|
function buildWaveShell {
|
|
|
|
|
(cd waveshell; CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-$WAVESHELL_VERSION-$1.$2 main-waveshell.go)
|
|
|
|
|
}
|
|
|
|
|
buildWaveShell darwin amd64
|
|
|
|
|
buildWaveShell darwin arm64
|
|
|
|
|
buildWaveShell linux amd64
|
|
|
|
|
buildWaveShell linux arm64
|
2023-10-16 13:35:03 -07:00
|
|
|
```
|
2023-10-16 15:11:22 -07:00
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# @scripthaus command build-backend
|
|
|
|
|
# @scripthaus cd :playbook
|
|
|
|
|
echo building waveshell
|
|
|
|
|
scripthaus run fullbuild-waveshell
|
|
|
|
|
echo building wavesrv
|
|
|
|
|
scripthaus run build-wavesrv
|
|
|
|
|
```
|