Welcome to releasr 👋

Twitter: krakaw_1

Release note tracking on a per environment per semver release.

Ever delay a release and then forget the steps you need to run when it eventually does go out. Releasr is made for just those times. Attach version specific release notes and retrieve them when the deployment is ready to go out.

Every release note is attached to an environment. Once a note has been completed it won't be shown again.

Notes cannot be added to a version that has been completed already.

Install

sh cargo build --release ./target/release/releasr

Usage

sh cp .env.sample .env ./releasr

Create Environments

```sh

Create a dev environment

curl http://localhost:8080/environments \ -X POST \ -H 'Content-Type: application/json' \ -d '{"name": "backenddev", "versionurl": "https://example.com/version.json", "lastdeployedversion": 0}'

Create a prod environment

curl http://localhost:8080/environments \ -X POST \ -H 'Content-Type: application/json' \ -d '{"name": "backendprod", "versionurl": "https://example.com/version.json", "lastdeployedversion": 0}' ```

Attach notes for a version

```sh

Attach a note to both environments

curl http://localhost:8080/notes -X POST -H 'Content-Type: application/json' -d '{"environment": "backend*", "version": "1.0.0", "note": "Run initial migrations using cargo run -- migrations"}' json [ { "id": 1, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backenddev", "completedat": null, "createdat": "2021-12-30T11:41:37.866539073Z", "modifiedat": "2021-12-30T11:41:37.866539073Z" }, { "id": 2, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:41:37.882175630Z", "modified_at": "2021-12-30T11:41:37.882175630Z" } ] sh

Attach a note to a specific environment for another version

curl http://localhost:8080/notes -X POST -H 'Content-Type: application/json' -d '{"environment": "backendprod", "version": "1.0.1", "note": "Manually delete records from table_x"}' json [ { "id": 3, "version": "1.0.1", "versionint": 1000001, "note": "Manually delete records from table_x", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:44:40.673926719Z", "modifiedat": "2021-12-30T11:44:40.673926719Z" } ] ```

List pending notes

```sh

To fetch all pending notes

curl http://localhost:8080/notes -X GET -H 'Content-Type: application/json' json [ { "id": 1, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backenddev", "completedat": null, "createdat": "2021-12-30T11:41:37.866539073Z", "modifiedat": "2021-12-30T11:41:37.866539073Z" }, { "id": 2, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:41:37.882175630Z", "modifiedat": "2021-12-30T11:41:37.882175630Z" }, { "id": 3, "version": "1.0.1", "versionint": 1000001, "note": "Manually delete records from table_x", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:44:40.673926719Z", "modified_at": "2021-12-30T11:44:40.673926719Z" } ] sh

To fetch specific pending notes for an environment and maximum version

curl http://localhost:8080/notes?environment=backendprod&version=1.0.0 -X GET -H 'Content-Type: application/json' json [ { "id": 2, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:41:37.882175630Z", "modifiedat": "2021-12-30T11:41:37.882175630Z" } ] ```

Complete notes for an environment and version

```sh

Once a deploy is complete and the notes have been executed, you can complete them.

curl http://localhost:8080/notes -X PATCH -H 'Content-Type: application/json' -d '{"environment": "backenddev", "version": "1.0.1"}' json { "completedcount": 1, "environment": { "lastdeployedversion": 1000001, "name": "backenddev", "versionurl": "https://example.com/version.json" } } ```

Delete a note permanently

```sh

Delete a note using its id

curl http://localhost:8080/notes/2 -X DELETE -H 'Content-Type: application/json' json { "id": 2, "version": "1.0.0", "versionint": 1000000, "note": "Run initial migrations using cargo run -- migrations", "environment": "backendprod", "completedat": null, "createdat": "2021-12-30T11:41:37.882175630Z", "modified_at": "2021-12-30T11:41:37.882175630Z" } ```

Test

sh cargo test

Author

👤 Krakaw

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator