github.com/supabase/cli@v1.168.1/CONTRIBUTING.md (about)

     1  # Welcome to Supabase CLI contributing guide
     2  
     3  ## Release process
     4  
     5  We release to stable channel every two weeks.
     6  
     7  We release to beta channel on merge to `main` branch.
     8  
     9  Hotfixes are released manually. Follow these steps:
    10  
    11  1. Create a new branch named `N.N.x` from latest stable version. For eg.
    12     1. If stable is on `v1.2.3` and beta is on `v1.3.6`, create `1.2.x` branch.
    13     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).
    14  2. Cherry-pick your hotfix on top of `N.N.x` branch.
    15  3. Run the [Release (Beta)](https://github.com/supabase/cli/actions/workflows/release-beta.yml) workflow targetting `N.N.x` branch.
    16  4. Verify your hotfix locally with `npx supabase@N.N.x help`
    17  5. Edit [GitHub releases](https://github.com/supabase/cli/releases) to set your hotfix pre-release as latest stable.
    18  
    19  After promoting the next beta version to stable, previous `N.N.x` branches may be deleted.
    20  
    21  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.
    22  
    23  ## Unit testing
    24  
    25  All new code should aim to improve [test coverage](https://coveralls.io/github/supabase/cli).
    26  
    27  We use mock objects for unit testing code that interacts with external systems, such as
    28  
    29  - local filesystem (via [afero](https://github.com/spf13/afero))
    30  - Postgres database (via [pgmock](https://github.com/jackc/pgmock))
    31  - Supabase API (via [gock](https://github.com/h2non/gock))
    32  
    33  Wrappers and test helper methods can be found under [internal/testing](internal/testing).
    34  
    35  Integration tests are created under [test](test). To run all tests:
    36  
    37  ```bash
    38  go test ./... -race -v -count=1 -failfast
    39  ```
    40  
    41  ## API client
    42  
    43  The Supabase API client is generated from OpenAPI spec. See [our guide](api/README.md) for updating the client and types.