Skip to content

Commit

Permalink
chore(cog): mod release ci yml; add dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinig committed Nov 1, 2023
1 parent 6b8c0c3 commit b58da4f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ Development setup:
* `rust >= v1.72` with `cargo-watch`, `cargo fmt`, `cargo clippy`
* `cocogitto >= v1.2.1` for convenvional commits and semantic version releases via `cog commit {feat} "{msg}" {scope}` command-line drop-in for `git commit`

Commits must use `cog commit` or manual conventional commit style - these can be squashed or rebased for a single merge commit into `dev` from the conventional commit named branch for example `feat/new_feature` or `chore/docs`. Pull requests only into `dev`. Release commits on `main` pull changes from `dev` via a `release/{version}` branch. CI release action triggers the `cog` auto changelog and version bump with cross compilation pipelines that attach Linux binaries on release publication.
Commits must use `cog commit` or manual conventional commit style - these can be squashed or rebased for a single merge commit into `dev` from the conventional commit named branch for example `feat/new_feature` or `chore/docs`. Pull requests only into `dev` never `main`. Release commits on `main` pull changes from `dev` via a `release/{version}` branc. Release action triggers the `cog bump --auto` changelog and version bump with cross compilation pipelines that attach Linux binaries on release publication.

## Setup dev environment

```bash
# get latest cerebro bin and clone repo to track state
git clone https://github.com/esteinig/cerebro.git@latest
# get latest cerebro bin for deployment
curl https://github.com/esteinig/cerebro/releases/download/latest/cerebro-latest-Linux_x86_64.tar.xz -o - | tar -xzO > cerebro

# clone repo to track state
git clone https://github.com/esteinig/cerebro.git@latest

# docker prefix for this deployment
CEREBRO_PREFIX="dev_local"

Expand All @@ -36,7 +38,7 @@ cd dev_local/ && docker compose up
# changes to the app ui are reflected immediately due to node dev server
# changes to the rust codebase require rebuild of the app e.g. when changing api code

# fmt and clippy hooks are executed for rust changes [TBD]
# [TBD] fmt and clippy hooks are executed for rust changes

# down the containter stack and remove the stopped containers - this is recommended
# as a local reverse proxy can return docker network errors and db connections can fail
Expand All @@ -48,9 +50,11 @@ docker compose up --build
# checkout current feat dev branch and commit changes
git checkout feat/new_feature
cog commit chore "minor changes to auth api" auth
# ...
git push origin feat/new_feature

# create new pr to merge feat/new_feature into dev
# create new pr with conventional commit style
# to merge feat/new_feature into dev

```

Expand Down Expand Up @@ -78,8 +82,7 @@ git add . && cog commit chore "$RELEASE_VERSION" release
# push to remote to trigger release and build actions
git push origin release/$RELEASE_VERSION

# create pr of `release/$RELEASE_VERSION`` into 'main'

# create pr of `release/$RELEASE_VERSION` into 'main'
# release with latest changelog and binaries is created

```

0 comments on commit b58da4f

Please sign in to comment.