Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1.83 KB

CONTRIBUTING.md

File metadata and controls

43 lines (27 loc) · 1.83 KB

Welcome to Supabase CLI contributing guide

Release process

We release to stable channel every two weeks.

We release to beta channel on merge to main branch.

Hotfixes are released manually. Follow these steps:

  1. Create a new branch named N.N.x from latest stable version. For eg.
    1. If stable is on v1.2.3 and beta is on v1.3.6, create 1.2.x branch.
    2. If stable is on v1.3.1 and beta is on v1.3.6, create 1.3.x branch (or simply release all patch versions).
  2. Cherry-pick your hotfix on top of N.N.x branch.
  3. Run the Release (Beta) workflow targetting N.N.x branch.
  4. Verify your hotfix locally with npx [email protected] help
  5. Edit GitHub releases to set your hotfix pre-release as latest stable.

After promoting the next beta version to stable, previous N.N.x branches may be deleted.

To revert a stable release, set a previous release to latest. This will update brew and scoop to an old version. There's no need to revert npm as it supports version pinning.

Unit testing

All new code should aim to improve test coverage.

We use mock objects for unit testing code that interacts with external systems, such as

  • local filesystem (via afero)
  • Postgres database (via pgmock)
  • Supabase API (via gock)

Wrappers and test helper methods can be found under internal/testing.

Integration tests are created under test. To run all tests:

go test ./... -race -v -count=1 -failfast

API client

The Supabase API client is generated from OpenAPI spec. See our guide for updating the client and types.