Skip to content

Commit

Permalink
docs: Improve development docs (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekampf authored Nov 1, 2023
1 parent d7ebd7b commit ebf8cdb
Showing 1 changed file with 34 additions and 15 deletions.
49 changes: 34 additions & 15 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@

## Development

1. We use [asdf](https://asdf-vm.com/) for version management. Install it and
then run `asdf install` in the root of this repo to install the correct
versions of the tools we use.
1. We use [direnv](https://direnv.net/) to manage environment variables. Install
it and then run `direnv allow` in the root of this repo to allow it to manage
your environment variables.
1. `cp .envrc.local.example .envrc.local` and edit the values to match your
environment.
1. Run `direnv allow`
1. Install [minikube](https://minikube.sigs.k8s.io/docs/start/)
1. `brew install minikube`
1. `minikube start`
Expand All @@ -34,6 +39,20 @@
1. You'll also want to `peotry run pre-commit install` to make sure you have
the pre-commit checks running locally.

### PyCharm & IDEs

If you use PyCharm, create a Run/Debug Configuration by adding a new
Python configuration and setting it as follows:

* Mode: `module name`
* Module name: `kopf`
* Arguments: `run ./main.py -A --verbose`
* Python Interpreter: your project's virtualenv
* Working directory: your project's root directory
* Environment variables: copy your `.envrc.local` file content

Congratulations! You are ready to develop and debug the Twingate operator.

## Release process

### Dev Releases
Expand All @@ -46,20 +65,20 @@ For example, for the version in `pyproject.toml` is `0.4.0` then dev releases
will be versioned as `0.4.1-dev.<build num>` and `CI` will publish the following
tags:

- `dev` - latest development
- `0.4.1-dev.<build num>`
* `dev` - latest development
* `0.4.1-dev.<build num>`

### Production Releases

- Run `./scripts/release.sh`:
- Calculate new version based on conventional commits
- Update version in `pyproject.toml`
- Update `CHANGELOG.md`
- Create a tag for the version and commit
- Once pushed a Github workflow will
- Create a Github release
- Publish the following tags to dockerhub:
- `latest`
- `<major>`
- `<major>.<minor>`
- `<major>.<minor>.<patch>`
* Run `./scripts/release.sh`:
* Calculate new version based on conventional commits
* Update version in `pyproject.toml`
* Update `CHANGELOG.md`
* Create a tag for the version and commit
* Once pushed a Github workflow will
* Create a Github release
* Publish the following tags to dockerhub:
* `latest`
* `<major>`
* `<major>.<minor>`
* `<major>.<minor>.<patch>`

0 comments on commit ebf8cdb

Please sign in to comment.