2024-06-13 23:49:25 +00:00
# Copyright 2024, Command Line Inc.
# SPDX-License-Identifier: Apache-2.0
2024-05-10 03:24:24 +00:00
version : "3"
vars :
2024-09-19 21:04:47 +00:00
APP_NAME : "Wave"
2024-05-10 03:24:24 +00:00
BIN_DIR : "bin"
2024-06-14 01:11:21 +00:00
VERSION :
sh : node version.cjs
2025-05-02 21:53:54 +00:00
RM : '{{if eq OS "windows"}}powershell Remove-Item -Force -ErrorAction SilentlyContinue{{else}}rm -f{{end}}'
RMRF : '{{if eq OS "windows"}}powershell Remove-Item -Force -Recurse -ErrorAction SilentlyContinue{{else}}rm -rf{{end}}'
2024-08-30 17:13:40 +00:00
DATE : '{{if eq OS "windows"}}powershell Get-Date -UFormat{{else}}date{{end}}'
2024-09-18 19:29:47 +00:00
ARTIFACTS_BUCKET : waveterm-github-artifacts/staging-w2
RELEASES_BUCKET : dl.waveterm.dev/releases-w2
2024-10-23 21:04:16 +00:00
WINGET_PACKAGE : CommandLine.Wave
2024-05-10 03:24:24 +00:00
2024-06-12 00:42:10 +00:00
tasks :
2024-07-18 05:39:22 +00:00
electron:dev :
2024-07-19 21:27:31 +00:00
desc : Run the Electron application via the Vite dev server (enables hot reloading).
2025-09-12 22:36:03 +00:00
cmd : npm run dev
2024-12-29 18:05:17 +00:00
aliases :
- dev
2024-07-18 01:42:49 +00:00
deps :
2025-09-12 22:36:03 +00:00
- npm:install
2024-11-15 20:19:31 +00:00
- docsite:build:embedded
2024-08-20 23:48:38 +00:00
- build:backend
2024-08-09 01:24:54 +00:00
env :
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel. Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.
Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 20:32:10 +00:00
WAVETERM_ENVFILE : "{{.ROOT_DIR}}/.env"
WCLOUD_ENDPOINT : "https://api-dev.waveterm.dev"
WCLOUD_WS_ENDPOINT : "wss://wsapi-dev.waveterm.dev"
2024-05-10 03:24:24 +00:00
2024-07-18 05:39:22 +00:00
electron:start :
2024-07-19 21:27:31 +00:00
desc : Run the Electron application directly.
2025-09-12 22:36:03 +00:00
cmd : npm run start
2024-12-29 18:05:17 +00:00
aliases :
- start
2024-06-13 23:49:25 +00:00
deps :
2025-09-12 22:36:03 +00:00
- npm:install
2024-11-15 20:19:31 +00:00
- docsite:build:embedded
2024-08-20 23:48:38 +00:00
- build:backend
2024-11-11 18:46:58 +00:00
env :
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel. Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.
Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 20:32:10 +00:00
WAVETERM_ENVFILE : "{{.ROOT_DIR}}/.env"
2025-02-03 23:32:44 +00:00
WCLOUD_ENDPOINT : "https://api-dev.waveterm.dev"
WCLOUD_WS_ENDPOINT : "wss://wsapi-dev.waveterm.dev"
2024-05-10 03:24:24 +00:00
2025-08-21 01:07:11 +00:00
electron:quickdev :
desc : Run the Electron application via the Vite dev server (quick dev - no docsite, arm64 only, no generate, no wsh).
2025-09-12 22:36:03 +00:00
cmd : npm run dev
2025-08-21 01:07:11 +00:00
deps :
2025-09-12 22:36:03 +00:00
- npm:install
2025-08-21 01:07:11 +00:00
- build:backend:quickdev
env :
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel. Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.
Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 20:32:10 +00:00
WAVETERM_ENVFILE : "{{.ROOT_DIR}}/.env"
2025-08-21 01:07:11 +00:00
WCLOUD_ENDPOINT : "https://api-dev.waveterm.dev/central"
WCLOUD_WS_ENDPOINT : "wss://wsapi-dev.waveterm.dev/"
2024-09-20 20:39:06 +00:00
storybook :
desc : Start the Storybook server.
2025-09-12 22:36:03 +00:00
cmd : npm run storybook
2024-11-15 20:19:31 +00:00
deps :
2025-09-12 22:36:03 +00:00
- npm:install
2024-11-15 20:19:31 +00:00
storybook:build :
desc : Build the Storybook static site.
2025-09-12 22:36:03 +00:00
cmd : npm run build-storybook
2024-11-15 20:19:31 +00:00
generates :
- storybook-static/**/*
deps :
2025-09-12 22:36:03 +00:00
- npm:install
docs:npm:install :
desc : Runs `npm install` in docs directory
internal : true
generates :
- docs/node_modules/**/*
- docs/package-lock.json
sources :
- docs/package-lock.json
- docs/package.json
cmd : npm install
dir : docs
2024-11-15 20:19:31 +00:00
docsite:start :
desc : Start the docsite dev server.
2025-09-12 22:36:03 +00:00
cmd : npm run start
2024-11-15 20:19:31 +00:00
dir : docs
2024-12-29 18:05:17 +00:00
aliases :
- docsite
2024-11-15 20:19:31 +00:00
deps :
2025-09-12 22:36:03 +00:00
- docs:npm:install
2024-11-15 20:19:31 +00:00
docsite:build:public :
desc : Build the full docsite.
cmds :
2025-09-12 22:36:03 +00:00
- cd docs && npm run build
2024-11-15 21:19:20 +00:00
- task : copyfiles:'storybook-static':'docs/build/storybook'
2025-09-16 01:32:55 +00:00
env :
USE_SIMPLE_CSS_MINIFIER : "true"
2024-11-15 20:19:31 +00:00
sources :
- "docs/*"
- "docs/src/**/*"
- "docs/docs/**/*"
- "docs/static/**/*"
2024-11-15 21:19:20 +00:00
- storybook-static/**/*
2024-11-15 20:19:31 +00:00
generates :
- "docs/build/**/*"
deps :
2025-09-12 22:36:03 +00:00
- docs:npm:install
2024-11-15 20:19:31 +00:00
- storybook:build
docsite:build:embedded :
2024-11-19 22:15:11 +00:00
desc : Build the embedded docsite and copy it to dist/docsite
2024-11-15 20:19:31 +00:00
sources :
- "docs/*"
- "docs/src/**/*"
- "docs/docs/**/*"
- "docs/static/**/*"
generates :
2024-11-19 22:15:11 +00:00
- "dist/docsite/**/*"
2024-11-15 20:19:31 +00:00
cmds :
2025-09-12 22:36:03 +00:00
- cd docs && npm run build-embedded
2024-11-26 02:07:29 +00:00
- task : copyfiles:'docs/build/':'dist/docsite'
2025-09-16 01:32:55 +00:00
env :
EMBEDDED : "true"
USE_SIMPLE_CSS_MINIFIER : "true"
2024-11-15 20:19:31 +00:00
deps :
2025-09-12 22:36:03 +00:00
- docs:npm:install
2024-09-20 20:39:06 +00:00
2024-07-18 05:39:22 +00:00
package :
desc : Package the application for the current platform.
2024-05-10 03:24:24 +00:00
cmds :
2025-09-12 22:36:03 +00:00
- npm run build:prod && npm exec electron-builder -- -c electron-builder.config.cjs -p never {{.CLI_ARGS}}
2024-05-10 03:24:24 +00:00
deps :
2025-08-27 06:21:49 +00:00
- clean
2025-09-12 22:36:03 +00:00
- npm:install
2024-11-19 22:15:11 +00:00
- docsite:build:embedded
2024-08-20 23:48:38 +00:00
- build:backend
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel. Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.
Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 20:32:10 +00:00
build:frontend:dev :
desc : Build the frontend in development mode.
cmd : npm run build:dev
deps :
- npm:install
2024-08-20 23:48:38 +00:00
build:backend :
desc : Build the wavesrv and wsh components.
cmds :
- task : build:server
- task : build:wsh
2024-05-10 03:24:24 +00:00
2025-08-21 01:07:11 +00:00
build:backend:quickdev :
desc : Build only the wavesrv component for quickdev (arm64 macOS only, no generate, no wsh).
cmds :
- task : build:server:quickdev
New AIPanel (#2370)
Massive PR, over 13k LOC updated, 128 commits to implement the first pass at the new Wave AI panel. Two backend adapters (OpenAI and Anthropic), layout changes to support the panel, keyboard shortcuts, and a huge focus/layout change to integrate the panel seamlessly into the UI.
Also fixes some small issues found during the Wave AI journey (zoom fixes, documentation, more scss removal, circular dependency issues, settings, etc)
2025-10-07 20:32:10 +00:00
sources :
- go.mod
- go.sum
- pkg/**/*.go
- cmd/**/*.go
- tsunami/go.mod
- tsunami/go.sum
- tsunami/**/*.go
2025-08-21 01:07:11 +00:00
2025-02-03 22:20:50 +00:00
build:schema :
desc : Build the schema for configuration.
sources :
- "cmd/generateschema/*.go"
- "pkg/wconfig/*.go"
generates :
- "dist/schema/**/*"
cmds :
- go run cmd/generateschema/main-generateschema.go
2025-02-03 23:05:06 +00:00
- cmd : '{{.RMRF}} "dist/schema"'
ignore_error : true
2025-02-03 22:20:50 +00:00
- task : copyfiles:'schema':'dist/schema'
2024-06-12 00:42:10 +00:00
build:server :
2024-07-18 05:39:22 +00:00
desc : Build the wavesrv component.
2024-11-16 00:12:21 +00:00
cmds :
- task : build:server:linux
- task : build:server:macos
- task : build:server:windows
2024-07-18 01:42:49 +00:00
deps :
2024-11-16 00:12:21 +00:00
- go:mod:tidy
2024-08-20 23:48:38 +00:00
- generate
2024-11-16 00:12:21 +00:00
sources :
- "cmd/server/*.go"
- "pkg/**/*.go"
2024-12-10 18:05:28 +00:00
- "pkg/**/*.json"
2025-09-15 19:58:59 +00:00
- tsunami/**/*.go
2024-11-16 00:12:21 +00:00
generates :
- dist/bin/wavesrv.*
2024-07-18 05:39:22 +00:00
2024-08-30 17:13:40 +00:00
build:server:macos :
desc : Build the wavesrv component for macOS (Darwin) platforms (generates artifacts for both arm64 and amd64).
2024-11-15 20:19:31 +00:00
platforms : [ darwin]
2024-07-18 05:39:22 +00:00
cmds :
2024-08-16 04:32:08 +00:00
- cmd : "{{.RM}} dist/bin/wavesrv*"
2024-07-18 22:16:49 +00:00
ignore_error : true
2024-07-18 01:42:49 +00:00
- task : build:server:internal
vars :
2024-08-30 17:13:40 +00:00
ARCHS : arm64,amd64
2025-08-21 01:07:11 +00:00
build:server:quickdev :
desc : Build the wavesrv component for quickdev (arm64 macOS only, no generate).
platforms : [ darwin]
cmds :
- task : build:server:internal
vars :
ARCHS : arm64
deps :
- go:mod:tidy
sources :
- "cmd/server/*.go"
- "pkg/**/*.go"
- "pkg/**/*.json"
2025-09-15 19:58:59 +00:00
- "tsunami/**/*.go"
2025-08-21 01:07:11 +00:00
generates :
- dist/bin/wavesrv.*
2024-08-30 17:13:40 +00:00
build:server:windows :
desc : Build the wavesrv component for Windows platforms (only generates artifacts for the current architecture).
2024-11-15 20:19:31 +00:00
platforms : [ windows]
2024-08-30 17:13:40 +00:00
cmds :
- cmd : "{{.RM}} dist/bin/wavesrv*"
ignore_error : true
2024-07-18 01:42:49 +00:00
- task : build:server:internal
vars :
2024-08-30 17:13:40 +00:00
ARCHS :
sh : echo {{if eq "arm" ARCH}}arm64{{else}}{{ARCH}}{{end}}
2025-01-10 23:23:56 +00:00
GO_ENV_VARS :
sh : echo "{{if eq "amd64" ARCH}}CC=\"zig cc -target x86_64-windows-gnu\"{{else}}CC=\"zig cc -target aarch64-windows-gnu\"{{end}}"
2024-07-18 05:39:22 +00:00
2024-08-30 17:13:40 +00:00
build:server:linux :
desc : Build the wavesrv component for Linux platforms (only generates artifacts for the current architecture).
2024-11-15 20:19:31 +00:00
platforms : [ linux]
2024-07-18 05:39:22 +00:00
cmds :
2024-08-16 04:32:08 +00:00
- cmd : "{{.RM}} dist/bin/wavesrv*"
2024-07-18 22:16:49 +00:00
ignore_error : true
2024-07-18 05:39:22 +00:00
- task : build:server:internal
vars :
2024-08-30 17:13:40 +00:00
ARCHS :
2024-07-18 22:53:20 +00:00
sh : echo {{if eq "arm" ARCH}}arm64{{else}}{{ARCH}}{{end}}
2024-09-25 04:56:45 +00:00
GO_ENV_VARS :
2025-01-10 23:23:56 +00:00
sh : echo "{{if eq "amd64" ARCH}}CC=\"zig cc -target x86_64-linux-gnu.2.28\"{{else}}CC=\"zig cc -target aarch64-linux-gnu.2.28\"{{end}}"
2024-07-18 22:53:20 +00:00
2024-07-18 01:42:49 +00:00
build:server:internal :
requires :
vars :
2024-08-30 17:13:40 +00:00
- ARCHS
2024-09-20 20:39:06 +00:00
cmd :
2024-09-25 06:04:58 +00:00
cmd : CGO_ENABLED=1 GOARCH={{.GOARCH}} {{.GO_ENV_VARS}} go build -tags "osusergo,sqlite_omit_load_extension" -ldflags "{{.GO_LDFLAGS}} -X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.WaveVersion={{.VERSION}}" -o dist/bin/wavesrv.{{if eq .GOARCH "amd64"}}x64{{else}}{{.GOARCH}}{{end}}{{exeExt}} cmd/server/main-server.go
2024-09-20 20:39:06 +00:00
for :
var : ARCHS
split : ","
as : GOARCH
2024-07-18 01:42:49 +00:00
internal : true
2024-05-10 03:24:24 +00:00
2024-06-21 21:44:11 +00:00
build:wsh :
2024-07-18 05:39:22 +00:00
desc : Build the wsh component for all possible targets.
2024-07-18 22:16:49 +00:00
cmds :
2024-08-16 04:32:08 +00:00
- cmd : "{{.RM}} dist/bin/wsh*"
2024-07-18 22:16:49 +00:00
ignore_error : true
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : darwin
GOARCH : arm64
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : darwin
GOARCH : amd64
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : linux
GOARCH : arm64
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : linux
GOARCH : amd64
2025-01-31 01:36:45 +00:00
- task : build:wsh:internal
vars :
GOOS : linux
GOARCH : mips
- task : build:wsh:internal
vars :
GOOS : linux
GOARCH : mips64
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : windows
GOARCH : amd64
2024-07-18 01:42:49 +00:00
- task : build:wsh:internal
vars :
2024-07-18 22:53:20 +00:00
GOOS : windows
GOARCH : arm64
2024-08-20 23:48:38 +00:00
deps :
2024-11-16 00:12:21 +00:00
- go:mod:tidy
2024-08-20 23:48:38 +00:00
- generate
2024-11-16 00:12:21 +00:00
sources :
- "cmd/wsh/**/*.go"
- "pkg/**/*.go"
2025-08-27 06:21:49 +00:00
generates :
- "dist/bin/wsh*"
2024-08-12 17:58:39 +00:00
2024-07-18 01:42:49 +00:00
build:wsh:internal :
vars :
2024-07-18 22:53:20 +00:00
EXT :
2024-07-18 01:42:49 +00:00
sh : echo {{if eq .GOOS "windows"}}.exe{{end}}
2024-09-04 18:23:39 +00:00
NORMALIZEDARCH :
sh : echo {{if eq .GOARCH "amd64"}}x64{{else}}{{.GOARCH}}{{end}}
2024-07-18 01:42:49 +00:00
requires :
vars :
- GOOS
- GOARCH
- VERSION
2024-09-20 20:39:06 +00:00
cmd : (CGO_ENABLED=0 GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags="-s -w -X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.WaveVersion={{.VERSION}}" -o dist/bin/wsh-{{.VERSION}}-{{.GOOS}}.{{.NORMALIZEDARCH}}{{.EXT}} cmd/wsh/main-wsh.go)
2024-07-18 01:42:49 +00:00
internal : true
2024-06-21 21:44:11 +00:00
2024-07-19 23:11:08 +00:00
generate :
desc : Generate Typescript bindings for the Go backend.
cmds :
2024-10-27 20:12:41 +00:00
- go run cmd/generatets/main-generatets.go
- go run cmd/generatego/main-generatego.go
2025-02-03 22:20:50 +00:00
deps :
- build:schema
2024-07-19 23:11:08 +00:00
sources :
2024-08-28 01:49:49 +00:00
- "cmd/generatego/*.go"
- "cmd/generatets/*.go"
2024-09-27 20:46:10 +00:00
- "pkg/**/*.go"
# don't add generates key (otherwise will always execute)
2024-07-19 23:11:08 +00:00
2025-08-19 17:19:15 +00:00
outdated :
desc : Check for outdated packages using npm-check-updates.
2025-09-12 22:36:03 +00:00
cmd : npx npm-check-updates@latest
2025-08-19 17:19:15 +00:00
Add release channels (#385)
## New release flow
1. Run "Bump Version" workflow with the desired version bump and the
prerelease flag set to `true`. This will push a new version bump to the
target branch and create a new git tag.
- See below for more info on how the version bumping works.
2. A new "Build Helper" workflow run will kick off automatically for the
new tag. Once it is complete, test the new build locally by downloading
with the [download
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/download-staged-artifact.sh).
3. Release the new build using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to beta
users.
4. Run "Bump Version" again with a release bump (either `major`,
`minor`, or `patch`) and the prerelease flag set to `false`.
6. Release the new build to all channels using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to all
users.
## Change Summary
Creates a new "Bump Version" workflow to manage versioning and tag
creation.
Build Helper is now automated.
### Version bumps
Updates the `version.cjs` script so that an argument can be passed to
trigger a version bump. Under the hood, this utilizes NPM's `semver`
package.
If arguments are present, the version will be bumped.
If only a single argument is given, the following are valid inputs:
- `none`: No-op.
- `patch`: Bumps the patch version.
- `minor`: Bumps the minor version.
- `major`: Bumps the major version.
- '1', 'true': Bumps the prerelease version.
If two arguments are given, the first argument must be either `none`,
`patch`, `minor`, or `major`. The second argument must be `1` or `true`
to bump the prerelease version.
### electron-builder
We are now using the release channels support in electron-builder. This
will automatically detect the channel being built based on the package
version to determine which channel update files need to be generated.
See
[here](https://www.electron.build/tutorials/release-using-channels.html)
for more information.
### Github Actions
#### Bump Version
This adds a new "Bump Version" workflow for managing versioning and
queuing new builds. When run, this workflow will bump the version,
create a new tag, and push the changes to the target branch. There is a
new dropdown when queuing the "Bump Version" workflow to select what
kind of version bump to perform. A bump must always be performed when
running a new build to ensure consistency.
I had to create a GitHub App to grant write permissions to our main
branch for the version bump commits. I've made a separate workflow file
to manage the version bump commits, which should help prevent tampering.
Thanks to using the GitHub API directly, I am able to make these commits
signed!
#### Build Helper
Build Helper is now triggered when new tags are created, rather than
being triggered automatically. This ensures we're always creating
artifacts from known checkpoints.
### Settings
Adds a new `autoupdate:channel` configuration to the settings file. If
unset, the default from the artifact will be used (should correspond to
the channel of the artifact when downloaded).
## Future Work
I want to add a release workflow that will automatically copy over the
corresponding version artifacts to the release bucket when a new GitHub
Release is created.
I also want to separate versions into separate subdirectories in the
release bucket so we can clean them up more-easily.
---------
Co-authored-by: wave-builder <builds@commandline.dev>
Co-authored-by: wave-builder[bot] <181805596+wave-builder[bot]@users.noreply.github.com>
2024-09-17 20:10:35 +00:00
version :
2024-09-18 20:12:34 +00:00
desc : Get the current package version, or bump version if args are present. To pass args to `version.cjs`, add them after `--`. See `version.cjs` for usage definitions for the arguments.
Add release channels (#385)
## New release flow
1. Run "Bump Version" workflow with the desired version bump and the
prerelease flag set to `true`. This will push a new version bump to the
target branch and create a new git tag.
- See below for more info on how the version bumping works.
2. A new "Build Helper" workflow run will kick off automatically for the
new tag. Once it is complete, test the new build locally by downloading
with the [download
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/download-staged-artifact.sh).
3. Release the new build using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to beta
users.
4. Run "Bump Version" again with a release bump (either `major`,
`minor`, or `patch`) and the prerelease flag set to `false`.
6. Release the new build to all channels using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to all
users.
## Change Summary
Creates a new "Bump Version" workflow to manage versioning and tag
creation.
Build Helper is now automated.
### Version bumps
Updates the `version.cjs` script so that an argument can be passed to
trigger a version bump. Under the hood, this utilizes NPM's `semver`
package.
If arguments are present, the version will be bumped.
If only a single argument is given, the following are valid inputs:
- `none`: No-op.
- `patch`: Bumps the patch version.
- `minor`: Bumps the minor version.
- `major`: Bumps the major version.
- '1', 'true': Bumps the prerelease version.
If two arguments are given, the first argument must be either `none`,
`patch`, `minor`, or `major`. The second argument must be `1` or `true`
to bump the prerelease version.
### electron-builder
We are now using the release channels support in electron-builder. This
will automatically detect the channel being built based on the package
version to determine which channel update files need to be generated.
See
[here](https://www.electron.build/tutorials/release-using-channels.html)
for more information.
### Github Actions
#### Bump Version
This adds a new "Bump Version" workflow for managing versioning and
queuing new builds. When run, this workflow will bump the version,
create a new tag, and push the changes to the target branch. There is a
new dropdown when queuing the "Bump Version" workflow to select what
kind of version bump to perform. A bump must always be performed when
running a new build to ensure consistency.
I had to create a GitHub App to grant write permissions to our main
branch for the version bump commits. I've made a separate workflow file
to manage the version bump commits, which should help prevent tampering.
Thanks to using the GitHub API directly, I am able to make these commits
signed!
#### Build Helper
Build Helper is now triggered when new tags are created, rather than
being triggered automatically. This ensures we're always creating
artifacts from known checkpoints.
### Settings
Adds a new `autoupdate:channel` configuration to the settings file. If
unset, the default from the artifact will be used (should correspond to
the channel of the artifact when downloaded).
## Future Work
I want to add a release workflow that will automatically copy over the
corresponding version artifacts to the release bucket when a new GitHub
Release is created.
I also want to separate versions into separate subdirectories in the
release bucket so we can clean them up more-easily.
---------
Co-authored-by: wave-builder <builds@commandline.dev>
Co-authored-by: wave-builder[bot] <181805596+wave-builder[bot]@users.noreply.github.com>
2024-09-17 20:10:35 +00:00
cmd : node version.cjs {{.CLI_ARGS}}
2024-09-18 19:29:47 +00:00
artifacts:upload :
desc : Uploads build artifacts to the staging bucket in S3. To add additional AWS CLI arguments, add them after `--`.
vars :
ORIGIN : "make/"
DESTINATION : "{{.ARTIFACTS_BUCKET}}/{{.VERSION}}"
cmd : aws s3 cp {{.ORIGIN}}/ s3://{{.DESTINATION}}/ --recursive --exclude "*/*" --exclude "builder-*.yml" {{.CLI_ARGS}}
artifacts:download:* :
desc : Downloads the specified artifacts version from the staging bucket. To add additional AWS CLI arguments, add them after `--`.
vars :
DL_VERSION : '{{ replace "v" "" (index .MATCH 0)}}'
ORIGIN : "{{.ARTIFACTS_BUCKET}}/{{.DL_VERSION}}"
DESTINATION : "artifacts/{{.DL_VERSION}}"
cmds :
- '{{.RMRF}} "{{.DESTINATION}}"'
- aws s3 cp s3://{{.ORIGIN}}/ {{.DESTINATION}}/ --recursive {{.CLI_ARGS}}
artifacts:publish:* :
desc : Publishes the specified artifacts version from the staging bucket to the releases bucket. To add additional AWS CLI arguments, add them after `--`.
vars :
UP_VERSION : '{{ replace "v" "" (index .MATCH 0)}}'
ORIGIN : "{{.ARTIFACTS_BUCKET}}/{{.UP_VERSION}}"
DESTINATION : "{{.RELEASES_BUCKET}}"
cmd : |
OUTPUT=$(aws s3 cp s3://{{.ORIGIN}}/ s3://{{.DESTINATION}}/ --recursive {{.CLI_ARGS}})
for line in $OUTPUT; do
PREFIX=${line%%{{.DESTINATION}}*}
SUFFIX=${line:${#PREFIX}}
if [[ -n "$SUFFIX" ]]; then
echo "https://$SUFFIX"
fi
done
2024-10-24 19:36:55 +00:00
artifacts:snap:publish:* :
2024-10-24 05:24:33 +00:00
desc : Publishes the specified artifacts version to Snapcraft.
vars :
UP_VERSION : '{{ replace "v" "" (index .MATCH 0)}}'
2024-10-24 20:53:03 +00:00
CHANNEL : '{{if contains "beta" .UP_VERSION}}beta{{else}}beta,stable{{end}}'
2024-10-24 05:24:33 +00:00
cmd : |
2024-10-24 20:53:03 +00:00
echo "Releasing to channels: [{{.CHANNEL}}]"
2024-12-09 18:13:41 +00:00
for file in waveterm_{{.UP_VERSION}}_*.snap; do
echo "Publishing $file"
snapcraft upload --release={{.CHANNEL}} $file
echo "Finished publishing $file"
done
2024-09-18 19:29:47 +00:00
2024-10-24 19:36:55 +00:00
artifacts:winget:publish:* :
2024-10-23 21:04:16 +00:00
desc : Submits a version bump request to WinGet for the latest release.
status :
2024-10-24 20:53:03 +00:00
- exit {{if contains "beta" .UP_VERSION}}0{{else}}1{{end}}
2024-10-23 21:04:16 +00:00
vars :
UP_VERSION : '{{ replace "v" "" (index .MATCH 0)}}'
cmd : |
2024-12-12 20:15:03 +00:00
wingetcreate update {{.WINGET_PACKAGE}} -s -v {{.UP_VERSION}} -u "https://{{.RELEASES_BUCKET}}/{{.APP_NAME}}-win32-x64-{{.UP_VERSION}}.msi" -t {{.GITHUB_TOKEN}}
2024-10-23 21:04:16 +00:00
2024-11-16 00:12:21 +00:00
dev:installwsh :
desc : quick shortcut to rebuild wsh and install for macos arm64
requires :
vars :
- VERSION
cmds :
- task : build:wsh:internal
vars :
GOOS : darwin
GOARCH : arm64
- cp dist/bin/wsh-{{.VERSION}}-darwin.arm64 ~/Library/Application\ Support/waveterm-dev/bin/wsh
2024-11-18 22:08:25 +00:00
dev:clearconfig :
desc : Clear the config directory for waveterm-dev
cmd : "{{.RMRF}} ~/.config/waveterm-dev"
dev:cleardata :
desc : Clear the data directory for waveterm-dev
cmds :
- task : dev:cleardata:windows
- task : dev:cleardata:linux
- task : dev:cleardata:macos
2025-01-05 04:18:31 +00:00
init :
desc : Initialize the project for development.
cmds :
2025-09-12 22:36:03 +00:00
- npm install
2025-01-05 04:18:31 +00:00
- go mod tidy
2025-09-12 22:36:03 +00:00
- cd docs && npm install
2025-01-05 04:18:31 +00:00
2024-11-18 22:08:25 +00:00
dev:cleardata:windows :
internal : true
platforms : [ windows]
cmd : '{{.RMRF}} %LOCALAPPDATA%\waveterm-dev\Data'
dev:cleardata:linux :
internal : true
platforms : [ linux]
cmd : "rm -rf ~/.local/share/waveterm-dev"
dev:cleardata:macos :
internal : true
platforms : [ darwin]
cmd : 'rm -rf ~/Library/Application\ Support/waveterm-dev'
2025-09-12 22:36:03 +00:00
npm:install :
desc : Runs `npm install`
2024-08-26 20:17:35 +00:00
internal : true
generates :
- node_modules/**/*
2025-09-12 22:36:03 +00:00
- package-lock.json
2024-08-26 20:17:35 +00:00
sources :
2025-09-12 22:36:03 +00:00
- package-lock.json
2024-08-26 20:17:35 +00:00
- package.json
2025-09-12 22:36:03 +00:00
cmd : npm install
2024-08-26 20:17:35 +00:00
2024-05-10 03:24:24 +00:00
go:mod:tidy :
2024-07-18 05:39:22 +00:00
desc : Runs `go mod tidy`
2024-05-10 03:24:24 +00:00
internal : true
generates :
- go.sum
sources :
- go.mod
2024-09-20 20:39:06 +00:00
cmd : go mod tidy
2024-11-15 20:19:31 +00:00
copyfiles:*:* :
2024-11-15 21:19:20 +00:00
desc : Recursively copy directory and its contents.
2024-11-15 20:19:31 +00:00
internal : true
2024-11-19 22:15:11 +00:00
cmd : '{{if eq OS "windows"}}powershell Copy-Item -Recurse -Force -Path {{index .MATCH 0}} -Destination {{index .MATCH 1}}{{else}}mkdir -p "$(dirname {{index .MATCH 1}})" && cp -r {{index .MATCH 0}} {{index .MATCH 1}}{{end}}'
2025-08-27 06:21:49 +00:00
clean :
desc : clean make/dist directories
cmds :
- cmd : '{{.RMRF}} "make"'
ignore_error : true
- cmd : '{{.RMRF}} "dist"'
ignore_error : true
2025-09-11 21:25:07 +00:00
tsunami:demo:todo :
desc : Run the tsunami todo demo application
cmd : go run demo/todo/*.go
dir : tsunami
env :
TSUNAMI_LISTENADDR : "localhost:12026"
tsunami:frontend:dev :
desc : Run the tsunami frontend vite dev server
cmd : npm run dev
dir : tsunami/frontend
tsunami:frontend:build :
desc : Build the tsunami frontend
2025-09-12 22:36:03 +00:00
cmd : npm run build
2025-09-11 21:25:07 +00:00
dir : tsunami/frontend
tsunami:frontend:devbuild :
desc : Build the tsunami frontend in development mode (with source maps and symbols)
2025-09-12 22:36:03 +00:00
cmd : npm run build:dev
2025-09-11 21:25:07 +00:00
dir : tsunami/frontend
tsunami:scaffold :
desc : Build scaffold for tsunami frontend development
deps :
- tsunami:frontend:build
cmds :
- task : tsunami:scaffold:internal
tsunami:devscaffold :
desc : Build scaffold for tsunami frontend development (with source maps and symbols)
deps :
- tsunami:frontend:devbuild
cmds :
- task : tsunami:scaffold:internal
2025-09-15 19:58:59 +00:00
tsunami:scaffold:packagejson :
desc : Create package.json for tsunami scaffold using npm commands
dir : tsunami/frontend/scaffold
cmds :
- cmd : "{{.RM}} package.json"
ignore_error : true
- npm --no-workspaces init -y --init-license Apache-2.0
- npm pkg set name=tsunami-scaffold
- npm pkg delete author
- npm pkg set author.name="Command Line Inc"
- npm pkg set author.email="info@commandline.dev"
- npm --no-workspaces install tailwindcss@4.1.13 @tailwindcss/cli@4.1.13
2025-09-11 21:25:07 +00:00
tsunami:scaffold:internal :
desc : Internal task to create scaffold directory structure
dir : tsunami/frontend
internal : true
cmds :
- cmd : "{{.RMRF}} scaffold"
ignore_error : true
- mkdir scaffold
2025-09-15 19:58:59 +00:00
- cp ../templates/package.json.tmpl scaffold/package.json
- cd scaffold && npm install
2025-09-11 21:25:07 +00:00
- cp -r dist scaffold/
- cp ../templates/app-main.go.tmpl scaffold/app-main.go
- cp ../templates/tailwind.css scaffold/
- cp ../templates/gitignore.tmpl scaffold/.gitignore
tsunami:build :
desc : Build the tsunami binary.
cmds :
- cmd : "{{.RM}} bin/tsunami*"
ignore_error : true
- mkdir -p bin
- cd tsunami && go build -ldflags "-X main.BuildTime=$({{.DATE}} +'%Y%m%d%H%M') -X main.TsunamiVersion={{.VERSION}}" -o ../bin/tsunami{{exeExt}} cmd/main-tsunami.go
sources :
- "tsunami/**/*.go"
- "tsunami/go.mod"
- "tsunami/go.sum"
generates :
- "bin/tsunami{{exeExt}}"
tsunami:clean :
desc : Clean tsunami frontend build artifacts
dir : tsunami/frontend
cmds :
- cmd : "{{.RMRF}} dist"
ignore_error : true
- cmd : "{{.RMRF}} scaffold"
ignore_error : true
godoc :
desc : Start the Go documentation server for the root module
cmd : $(go env GOPATH)/bin/pkgsite -http=:6060
tsunami:godoc :
desc : Start the Go documentation server for the tsunami module
cmd : $(go env GOPATH)/bin/pkgsite -http=:6060
dir : tsunami