Commit Graph

48 Commits

Author SHA1 Message Date
Gergely Nagy
0ea2ad2027 tools/firmware-update: We do need static/build-info.yml
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-28 12:13:22 +02:00
Gergely Nagy
2ef02e05c0 tools/firmware-update: Update to use tar.gz, rather than .tar
The firmware bundle switched to tar.gz artifacts a while ago, lets follow suit.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-28 09:28:07 +02:00
Gergely Nagy
3d857ba1ce cldr: When loading from an OSX keymap, swap E00 and B00
macOS has the E00 (left of `1`) and B00 (between `shift` and `z`) keys swapped.
Our layout display code, the floating 104-key picker assumes a different layout.
So for display purposes, when reading from macOS layouts, swap E00 and B00.

Together with the previous commit, this fixes #1014, and makes the Croatian
layout *almost* correct on Windows and Linux too, with only one symbol
mis-mapped. There's nothing we can do about that at the moment.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-27 20:55:52 +02:00
Gergely Nagy
007e0ba67d cldr: Add support for shift+optional-mods modifiers
Similarly how we treat `altR+caps?` as valid altR mapping, we need to treat
`shift+caps?`, `shift+cmd?`, and other combinations of `shift` and optional
modifiers as shift.

This addresses one part of #1014.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-27 11:23:05 +02:00
Gergely Nagy
43e1dd2d6e tools: When creating a new snapshot, commit the updated README too
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-07 11:20:48 +02:00
Gergely Nagy
2cc36b0964 tools/release: Do the firmware update step later
We need to do the firmware update step later, after we finalized the Chrysalis
versions, otherwise there will be a mismatch.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-07-06 22:19:52 +02:00
Jesse Vincent
871f7d47ca Don't precompile cldr generated data if it has already been generated 2022-06-29 21:16:05 -07:00
Gergely Nagy
845a2592e1 cldr: Pick up altR modifiers from a few more places
We can pick up altR-modified symbols from a few other keymaps, not just those
that have `altR` as the single modifier, but those that have `+caps?` too,
because caps is optional there.

This fixes #727.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-29 20:23:36 +02:00
Gergely Nagy
29693c69fd tools/log-analysis: Teach the analyzer to recognise another kind of error
When we have a failing flash, one that fails at the bootloaderWait step, check
if the keyboard remained in normal mode.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-26 08:51:36 +02:00
Gergely Nagy
de8b0c051b Update the firmware update tooling
Adjust the documentation and the firmware update & release scripts to how we're
doing firmware releases going forward.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-25 01:14:56 +02:00
Gergely Nagy
3fee79d3dd Enable auto-update for snapshot builds too
For this to work, we need to change our workflow a little: instead of a static
`snapshot` tag, we have to use a SemVer-compatible tag, such as
`0.10.3-snapshot` - effectively the same version that is in `package.json` (sans
the build number).

To make this automatic, there's a new tool, `tools/snapshot-tag`, which strips
the build number from the version in `package.json`, if there's any. We use this
tool to figure out which tag to re-release during the snapshot workflow.

We also have to update README.md to point to the appropriate snapshot, so the
`tools/release/create-snapshot.sh` tool has been updated to take care of that,
too.

With the workflow changes, we can adjust the autoUpdater configuration to allow
pre-releases, and use the "snapshot" channel. Because we only enable this when
running a snapshot release, auto-upgrade *to* a snapshot release will only work
from a snapshot release. Upgrading from an earlier snapshot to a release is not
done either, because we're tied to a given channel.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-24 12:10:58 +02:00
Jesse Vincent
237a32ff25 Build out localized locale names for eventual use in the renderer 2022-06-24 09:13:28 +02:00
Gergely Nagy
cada16b80d tools/precompile: Lift cldrDir out
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-23 22:52:24 +02:00
Gergely Nagy
32132bf351 Pregenerate the CLDR data, rather than loading it from the renderer
We still import cldr from the renderer process, for
`cldr.extractLanguageDisplayNames`, but that hopefully doesn't expect to be in a
node environment.

If it does, we'll have to push it (along with the cldr data) to the main process.

Fixes #924.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-23 18:16:18 +02:00
Gergely Nagy
e8587bc467 tools: Add another common case to the log analyzer
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-10 09:04:36 +02:00
Gergely Nagy
7937b6ed34 tools: Add a naive bundle log analysis tool
The purpose of the tool is to comb through a bundled log (and eventually perhaps
a live log, too), and highlight where things went sideways, and perhaps how.

It requires a bundle made with a recent Chrysalis snapshot.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-06-05 00:28:21 +02:00
Jesse Vincent
ba38fc95a9 Add a small tool that only works on an ARM mac but which will build us a
statically linked dfu-util
2022-06-01 16:09:23 -07:00
Gergely Nagy
7345fcc0e7 tools/release/release.sh: Remove the unused extract_news() function
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-30 10:12:50 +02:00
Gergely Nagy
29d0ffa47b tools/release/release.sh: Create a signed, annotated tag
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-30 10:11:56 +02:00
Gergely Nagy
e9c79f0722 tools: Update the screenshot tool
Recent ImageMagick prevents us from piping from import to convert directly, so
use an intermediate file as a workaround.

Furthermore, the white border was removed, because it didn't play nice with our
new Keyboardio-orange header.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-30 09:25:20 +02:00
Gergely Nagy
e3417c239b tools/release/release.sh: Confirm the screenshot is up to date
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-30 08:28:11 +02:00
Gergely Nagy
bae63032cd tools/release/release.sh: Confirm the usb and serialport versions are correct
The `usb` and `serialport` packages are finnicky, they break us easily. During
the release process, ask if the versions found are correct.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-30 08:25:25 +02:00
Gergely Nagy
8ac6ffbd2e tools/preinstall.js: Don't rewrite package.json unnecessarily
The goal of this preinstall script is to add a build number to the package
version within our CI environment. Outside of CI, it should do nothing. However,
it was unconditionally overwriting `package.json`, with a version that has no
trailing newline.

That's an issue, because most editors will add one, so running `yarn install`
always removed that, ending up with the change making the git working directory
dirty.

As there is no reason to save the file when we're not running in the CI
environment, move the writing inside the if branch. We don't care if the working
tree becomes dirty in CI, it will be discarded anyway. Not running
unconditionally will stop newlines getting removed, and make development that
much less annoying.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2022-05-28 19:27:54 +02:00
Gergely Nagy
dc5322da79 tools/release/release.sh: Replace draft release creation with tagging
We delegated the release creation to the github actions workflow, so all we need
to do now is tag a release and push it.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-29 20:15:08 +02:00
Gergely Nagy
96ffa1bfed github/workflows: Update the release workflow to be more reliable
Instead of relying on electron-builder to do the right thing, do the release
process ourselves, step by step.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-29 19:14:50 +02:00
Gergely Nagy
e8dccfc2ab Update our release and snapshot workflows
This is a major restructuring of our GitHub Actions workflows. First of all, we
now have separate workflows for release and snapshot builds, as having them
separate makes it easier to control which one runs when. It also allows us to
fine tune a lot of things for the snapshot workflow, which runs much more often.

Another change is that we're now using a static tag (`snapshot`) for development
builds, rather than a versioned tag, and this tag - and the pre-release on
GitHub - will get remade on every run, to keep it up to date.

We also have the build number back for our snapshot builds again, something we
lost with the transition away from Travis.

Documentation and scripts have been appropriately updated.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-03-23 21:28:15 +01:00
Gergely Nagy
9be206c16f tools/release/release.sh: Update the script to be smarter
We should not require a version to be specified on the commandline, we can just
cut the -snapshot part and run with it. We can then automatically update both
package.json and NEWS.md.

We should also ask if we need to update the shipped firmware.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-25 21:47:18 +01:00
Gergely Nagy
bda7d76d7a tools/release/release.sh: Fix verify_version()
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-25 21:33:05 +01:00
Gergely Nagy
3fda69f540 tools: Use v${VERSION} as the tag when releasing
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-19 12:42:22 +01:00
Gergely Nagy
0ab52878fc tools: Fix the name of the firmware update script in the release helper
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-19 12:39:22 +01:00
Gergely Nagy
34d794069a tools: Update the README too when creating a new snapshot
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-19 12:37:48 +01:00
Gergely Nagy
8e9c4f92cc tools: Delete obsolete helpers
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-19 12:31:32 +01:00
Gergely Nagy
507947cea6 tools: Add two scripts to aid us in the release process
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-18 16:15:45 +01:00
Gergely Nagy
5e00b2501f Major redesign of the Editor screen
Our Editor screen has been showing its age, and with this massive change, we
replace it entirely. We do so in one big commit, because it is a major rewrite,
splitting it up into smaller parts is not practical.

With the new Editor, we moved away from having a double toolbar at the top, and
a selector on the bottom: both were merged into a sidebar, with a number of
sections for keys and features. Many of those will show their contents in-line,
some of them, like the key picker, will pop up a dialog instead.

We also redesigned how our labels are displayed, and we now support different
host-side layouts, via the Unicode CLDR project. While there's work to be done
on the labeling front, the APIs to do so, and to work with keys and key groups,
are considerably more developer friendly.

Furthermore, layout sharing has been redesigned aswell: we now export and import
to and from files, and share the whole keymap, all layers included. At this
time, there's no per-layer sharing supported.

As a regression, layer copying and layer erasing is currently not implemented
for the new Editor.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2021-01-09 20:34:46 +01:00
Gergely Nagy
9e907b24bc tools/get-artifact: Support fetching from a branch too
Rewrote the option parsing, now based on `getopts`, to make it easier to select
the branch to download from. Also add a way to select the branch, now that we
can do so easily.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-11-09 12:29:54 +01:00
Gergely Nagy
80eda6452b travis: Do automatic builds & uploads for branches too
To make it easier to test branches, build and upload artifacts for them too. We
still do not want to do that for PRs, but for branches pushed to the repo, we
do.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-11-09 11:11:09 +01:00
Gergely Nagy
f11d72ee3c Add support for Linux/arm64 builds
Travis has a Linux/arm64 environment, Chrysalis builds there fine, and works
well on arm64, too. As such, adjust our Travis config to build it, and the
artifact upload/download tools to support multiple architectures for Linux.

Fixes #524.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-10-09 16:09:41 +02:00
Jesse Vincent
cd5bd36bac Switch to a build matrix to try to get modern xcode 2020-07-28 17:05:06 -07:00
Jesse Vincent
02c5bacc4b Start to add support for signing macOS builds 2020-07-28 14:52:50 -07:00
Jesse Vincent
bd9c8136b4 Revert changes to upload artifacts to s3, as they broke uploads completely 2020-07-03 11:26:09 -07:00
Jesse Vincent
fa6a4e7972 I got the script a bit wrong in the last update 2020-06-26 17:28:17 -07:00
Jesse Vincent
d7b9c2e2db Because S3's js API does not support 302 redirects, switch to pushing the latest build to a known location, rather than redirecting to the build. 2020-06-26 16:57:33 -07:00
Gergely Nagy
7aed25a6d8 Add a tool to pull and update the shipped firmware hexes
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-03-22 13:11:05 +01:00
Gergely Nagy
e3b2a965df tools/get-artifact: Verbosity and URL encoding fix
Added a bit of verbosity to the script, so we have a clue what it is doing at
the moment, and where the downloaded file will be saved. Also fixed an issue
with the script trying to download the wrong thing, because it forgot to escape
`+` in the version - now it does that.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2020-02-11 12:22:02 +01:00
Gergely Nagy
bf03200850 Add a tool to update the screenshot
To make it easier to keep the screenshot up-to-date, added a small script that
takes a screenshot of a running Chrysalis, adds drop shadow around it, and saves
it as `data/screenshot.png`. Assumes ImageMagick is installed, and that we're
running under XOrg.

While there, also update the screenshot, using the new tool.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-02-04 10:25:11 +01:00
Gergely Nagy
619bcbef82 tools/s3-upload.js: Add the missing Bucket param to the redirect call
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-02-03 23:23:39 +01:00
Gergely Nagy
da6826f10c tools/s3-upload: Redirect Chrysalis/latest/Chrysalis.*
On a successful upload, redirect `Chrysalis/latest/Chrysalis.$EXTENSION` to the
current upload. This gives us a static URL that always points to the latest
artifact.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-02-03 11:42:56 +01:00
Gergely Nagy
7114a89390 Add a Travis control file
This adds a few new scripts to `package.json`, so that we can do `yarn run
build:$TRAVIS_OS_NAME`, and adds a Travis control file that builds Chrysalis on
all three platforms. Furthermore, when running under Travis, add some build
metadata to the version number (unless we're building a tag).

Artifacts are uploaded to S3.

Fixes #56.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
2019-02-02 13:31:44 +01:00