This repository contains release tooling for the Redwood monorepo.
-
In your shell start-up file (e.g.
~/.zshrc
or~/.bashrc
) or a.env
file (that you create) in this directory, add the following environment variable:touch .env echo "export RWFW_PATH='/path/to/redwoodjs/redwood'" >> .env echo "export REDWOOD_GITHUB_TOKEN='...'" >> .env
Where
RWFW_PATH
is the path to your local copy of the Redwood monorepo andREDWOOD_GITHUB_TOKEN
is a personal access token with thepublic_repo
scope. -
Check out the
main
andnext
branches from the Redwood monorepo's remote:cd $RWFW_PATH git fetch <your-redwood-remote> git switch main git switch next
-
Run
yarn install
in this directory. It should fly by! This project uses Yarn's zero-installs
Redwood has a dual-branch strategy.
Most of the work involves moving commits from the main branch to the next branch.
The yarn triage
command guides you through this process:
yarn triage
When it's time to release, run the yarn release
command:
yarn release
Use yarn lint
and yarn fmt
to lint and format your code respectively:
yarn lint
yarn fmt
yarn lint
uses ESLint and yarn fmt
uses dprint. I couldn't get the ESLint VS Code extension to play nicely with Yarn's zero-installs, so you won't be able to just save the file and have everything linted and formatted. Use those two CLI commands for the time being.
Running tests requires a bit more setup than I'd like, but here's what you need to do...
-
Ensure you have the Redwood monorepo locally
-
In the Redwood monorepo checkout the
release-tooling/main-test
andrelease-tooling/next-test
branches:cd $RWFW_PATH git switch release-tooling/main-test git switch release-tooling/next-test
Then navigate back to this repo and you should be able to run the tests:
cd /path/to/redwoodjs/release-tooling
yarn test