Commit Graph

3 Commits

Author SHA1 Message Date
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
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
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