mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
okay let's see what happens
This commit is contained in:
parent
07f176ea53
commit
95d7f72456
15
.github/workflows/build-helper.yml
vendored
15
.github/workflows/build-helper.yml
vendored
@ -11,15 +11,13 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- platform: "darwin"
|
||||
arch: "x64"
|
||||
runner: "macos-latest"
|
||||
scripthaus: "build-package"
|
||||
- platform: "darwin"
|
||||
arch: "arm64"
|
||||
arch: "universal"
|
||||
runner: "macos-latest-xlarge"
|
||||
scripthaus: "build-package"
|
||||
- platform: "linux"
|
||||
arch: "x64"
|
||||
arch:
|
||||
- "amd64"
|
||||
- "arm64"
|
||||
runner: "ubuntu-latest"
|
||||
scripthaus: "build-package-linux"
|
||||
runs-on: ${{ matrix.runner }}
|
||||
@ -58,8 +56,9 @@ jobs:
|
||||
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
- name: Install Yarn Dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
- name: Build
|
||||
run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
|
||||
- name: Build ${{ matrix.platform }} ${{ matrix.arch }}
|
||||
run: |
|
||||
GOARCH=${{ matrix.arch}} ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: waveterm-build-${{ matrix.platform }}-${{ matrix.arch }}
|
||||
|
@ -25,16 +25,17 @@ const config = {
|
||||
to: "./bin",
|
||||
filter: ["**/*"],
|
||||
},
|
||||
{
|
||||
from: "./node_modules",
|
||||
to: "./node_modules",
|
||||
filter: ["monaco-editor/min/*"],
|
||||
},
|
||||
{
|
||||
from: ".",
|
||||
to: ".",
|
||||
filter: ["package.json"],
|
||||
},
|
||||
"!**/node_modules/**${/*}", // Ignore node_modules by default
|
||||
{
|
||||
from: "./node_modules",
|
||||
to: "./node_modules",
|
||||
filter: ["monaco-editor/min/**/*"], // This is the only module we want to include
|
||||
},
|
||||
],
|
||||
directories: {
|
||||
output: "buildres/builder",
|
||||
@ -55,12 +56,11 @@ const config = {
|
||||
executableName: pkg.productName,
|
||||
category: "TerminalEmulator",
|
||||
icon: "public/waveterm.icns",
|
||||
target: ["zip", "rpm", "deb", "flatpak", "pacman"],
|
||||
target: ["zip", "deb"],
|
||||
asar: false,
|
||||
desktop: {
|
||||
Name: pkg.productName,
|
||||
Comment: pkg.description,
|
||||
Exec: pkg.productName,
|
||||
Icon: pkg.build.appId,
|
||||
Keywords: "developer;terminal;emulator;",
|
||||
category: "Development;Utility;",
|
||||
},
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "waveterm",
|
||||
"author": "Command Line Inc",
|
||||
"author": {
|
||||
"name": "Command Line Inc",
|
||||
"email": "info@commandline.dev"
|
||||
},
|
||||
"productName": "Wave",
|
||||
"description": "An open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.",
|
||||
"version": "0.6.1",
|
||||
"main": "dist/emain.js",
|
||||
"license": "Apache-2.0",
|
||||
"maintainers": [
|
||||
"Command Line Inc"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/wavetermdev/waveterm"
|
||||
|
@ -44,13 +44,21 @@ rm -rf bin/
|
||||
rm -rf build/
|
||||
node_modules/.bin/webpack --env prod
|
||||
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||
WAVESHELL_VERSION=v0.4
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.amd64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.arm64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.amd64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.arm64 main-waveshell.go)
|
||||
(cd wavesrv; CGO_ENABLED=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 ./cmd)
|
||||
yarn run electron-builder -c electron-builder.config.js
|
||||
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
|
||||
```
|
||||
|
||||
```bash
|
||||
@ -61,38 +69,43 @@ rm -rf bin/
|
||||
rm -rf build/
|
||||
node_modules/.bin/webpack --env prod
|
||||
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||
WAVESHELL_VERSION=v0.4
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.amd64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.arm64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.amd64 main-waveshell.go)
|
||||
(cd waveshell; CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.arm64 main-waveshell.go)
|
||||
# adds -extldflags=-static, *only* on linux (macos does not support fully static binaries) to avoid a glibc dependency
|
||||
(cd wavesrv; CGO_ENABLED=1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv ./cmd)
|
||||
node_modules/.bin/electron-forge make
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command open-electron-package
|
||||
# @scripthaus cd :playbook
|
||||
open out/Wave-darwin-x64/Wave.app
|
||||
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
|
||||
(cd wavesrv; CGO_ENABLED=1 GOARCH=$1 go build -tags "osusergo,netgo,sqlite_omit_load_extension" -ldflags "-linkmode 'external' -extldflags=-static $GO_LDFLAGS -X main.WaveVersion=$WAVESRV_VERSION" -o ../bin/wavesrv.$1 ./cmd)
|
||||
}
|
||||
buildWaveShell darwin amd64
|
||||
buildWaveShell darwin arm64
|
||||
buildWaveShell linux amd64
|
||||
buildWaveShell linux arm64
|
||||
buildWaveSrv $GOARCH
|
||||
yarn run electron-builder -c electron-builder.config.js -l
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command build-wavesrv
|
||||
WAVESRV_VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||
cd wavesrv
|
||||
CGO_ENABLED=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 ./cmd
|
||||
CGO_ENABLED=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.$GOARCH ./cmd
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command fullbuild-waveshell
|
||||
set -e
|
||||
cd waveshell
|
||||
WAVESHELL_VERSION=v0.4
|
||||
GO_LDFLAGS="-s -w -X main.BuildTime=$(date +'%Y%m%d%H%M')"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.amd64 main-waveshell.go
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-linux.arm64 main-waveshell.go
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.amd64 main-waveshell.go
|
||||
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$GO_LDFLAGS" -o ../bin/mshell/mshell-v0.4-darwin.arm64 main-waveshell.go
|
||||
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
|
||||
```
|
||||
|
||||
```bash
|
||||
|
@ -160,7 +160,7 @@ function getBaseHostPort(): string {
|
||||
}
|
||||
|
||||
function getWaveSrvPath(): string {
|
||||
return path.join(getGoAppBasePath(), "bin", "wavesrv");
|
||||
return path.join(getGoAppBasePath(), "bin", `wavesrv.${unameArch}`);
|
||||
}
|
||||
|
||||
function getWaveSrvCmd(): string {
|
||||
|
Loading…
Reference in New Issue
Block a user