Commit Graph

27 Commits

Author SHA1 Message Date
Evan Simkowitz
8d79539a50
Fix bugs in electron-builder and build-helper (#1119) 2024-10-24 11:20:25 -07:00
Evan Simkowitz
3bd9249e81
Add steps to publish to Snapcraft (#1102)
Draft until our Snap package is approved for classic confinement:
https://forum.snapcraft.io/t/classic-confinement-request-for-waveterm/43562
2024-10-23 22:24:33 -07:00
Evan Simkowitz
81a8a7f3eb
Snap support (#1095)
Adds Snap support, though I'm still waiting to hear back from the
Snapcraft team about getting our package listed.

closes #1092
2024-10-21 18:13:19 -07:00
Evan Simkowitz
8dbb1f90d2
Fix path for chrome-sandbox chmod (#1091) 2024-10-21 13:29:15 -07:00
Evan Simkowitz
f41a844a38
Attempt to fix chrome-sandbox permissions issue on Linux (#1089)
Also allows for test runs of build-helper, which will not upload to
staging
2024-10-21 12:52:13 -07:00
Evan Simkowitz
fae06600cc
Fix Windows packaging when signing isn't provided, update app icon on Windows (#1055)
This adds a new app icon for windows that is less Mac-like and it also
fixes a bug in the electron-builder.config.cjs file which would cause
the packaging step to crash if it was missing the signing env vars,
rather than just not signing the package.


![image](https://github.com/user-attachments/assets/fe433ae5-0b88-49a9-91b6-d1083460b7b2)
2024-10-17 14:27:15 -07:00
Evan Simkowitz
74cda378f8
Embed static copy of docsite for help view (#949)
This will take the latest artifact from the waveterm-docs repo and embed
it in the app binary. When the help view is launched, it will be served
from our backend. If the embedded copy doesn't exist, such as in
unpackaged versions of the app or in locally packaged versions, it will
use the hosted site instead.

There is a sibling PR in the docs repository to build the embedded
version of the app (strips out some external links, removes Algolia
DocSearch, updates the baseUrl)
https://github.com/wavetermdev/waveterm-docs/pull/46
2024-10-03 20:28:05 -07:00
Evan Simkowitz
9d1e519308
Add Wayland hint flags to Linux build (#948) 2024-10-03 11:04:02 -07:00
Evan Simkowitz
192f6b602f
Fix chrome sandbox issue on Ubuntu (#835) 2024-09-24 21:26:16 -07:00
sawka
c768616a24 only set executableName for linux 2024-09-19 22:14:14 -07:00
sawka
0b2fdf0ca0 update app name in permissions part as well 2024-09-19 21:51:24 -07:00
sawka
eced7120c7 override name for linux 2024-09-19 21:49:10 -07:00
sawka
b0c5443916 use productName for executable 2024-09-19 21:38:10 -07:00
Evan Simkowitz
5b7535d08f
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 13:10:35 -07:00
Evan Simkowitz
e7b99d165a
Update secrets to the new Apple Developer account creds (#384) 2024-09-16 23:10:04 -07:00
Evan Simkowitz
1706131a80
use resolve for packageBinDir for posterity 2024-09-05 16:50:38 -07:00
Evan Simkowitz
d58d09e013
add comment about permissions 2024-09-05 16:48:08 -07:00
Evan Simkowitz
a2259cb7eb
Fix user permissions for wavesrv.arm64 in macOS Universal binary (#333)
Adds an afterPack script in electron-builder to correct permissions for
wavesrv.arm64 after it is copied into the universal binary.
2024-09-05 16:47:14 -07:00
Evan Simkowitz
0c506a1768
Make exe name match package name (#328)
This changes the executable name on all platforms to the lowercase
package name, which should make symlinking easier. It also updates the
package naming on Linux to be more consistent with the expectations of
the Linux package managers.

This should address https://github.com/wavetermdev/waveterm/issues/689
2024-09-05 15:41:04 -07:00
Evan Simkowitz
0413b240dd
Only copy the relevant wavesrv binary when packaging for a specific architecture (#316)
This change shaves ~20 MB off the download size by only copying over the
wavesrv binary that is relevant for whichever architecture we're
currently packaging. This is only relevant for macOS at the moment,
though it can also apply to Windows when we get multi-arch builds
working.

This required renaming our Go binaries from .amd64 to .x64 to comply
with electron-builder's naming conventions.
2024-09-04 11:23:39 -07:00
Evan Simkowitz
fa69406550
fix publisher name for windows 2024-09-03 21:58:20 -07:00
Evan Simkowitz
a2695e8c08
Set up Windows build pipeline (#292)
This adds a new job to the Build Helper pipeline for building for
Windows. This includes code signing via DigiCert. Right now, we can only
build for x64 on Windows as wavesrv fails to build for arm64 in the
default runner and the Windows ARM runner images are missing a bunch of
tooling.

This also adds new separated arm64 and x64 for macOS for those who don't
want to use the universal binary.

This also improves the general code quality of the Taskfile.yml and the
build-helper.yml files.
2024-08-30 10:13:40 -07:00
Evan Simkowitz
5c00fc6e78
Fix sharp import issue (#251)
This PR updates the window controls overlay code to remove the
dependency on `sharp`, which is a natively-compiled Node library that is
really hard to package for Electron given the way that we strip node
modules after bundling. I've replaced this with `pngjs`, which has a
smaller footprint and is still relatively fast (it doesn't need to be
perfect since it runs on the Node process instead of the browser
process).
2024-08-20 13:18:47 -07:00
Evan Simkowitz
ca3f418dc5
add sharp requirements to asarUnpack 2024-08-19 16:17:14 -07:00
Evan Simkowitz
c47e17903d
Add auto updater configuration (#122)
Adds a new set of configurations for managing whether the app will
automatically check for updates. Ports over the auto update code from
the old app. In this version, the main difference is that updates can be
manually checked for using a menu bar item, even if auto updates are
disabled.
2024-07-18 16:55:04 -07:00
Evan Simkowitz
01d61dabec
Clean up app package (#118) 2024-07-18 15:16:49 -07:00
Evan Simkowitz
8971e2feba
Set up electron-builder for new app (#113)
Adds electron-builder, which we will use to package and distribute our
application, same as in the existing app.
Replaces explicit port assignments with dynamic ones, which are then
stored into environment variables.
Adds a ~/.w2-dev folder for use when running a dev build.

The build-helper pipeline from the old repo is included here too, but it
is not updated yet so it will fail.

Also removes some redundant utility functions and cleans up some let vs.
const usage.

The packaging can be run using the `package:prod` and `package:dev`
tasks.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-07-17 18:42:49 -07:00