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.
sh
cargo build --release
./target/release/releasr
sh
cp .env.sample .env
./releasr
```sh
curl http://localhost:8080/environments \ -X POST \ -H 'Content-Type: application/json' \ -d '{"name": "backenddev", "versionurl": "https://example.com/version.json", "lastdeployedversion": 0}'
curl http://localhost:8080/environments \ -X POST \ -H 'Content-Type: application/json' \ -d '{"name": "backendprod", "versionurl": "https://example.com/version.json", "lastdeployedversion": 0}' ```
```sh
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
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"
}
]
```
```sh
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
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"
}
]
```
```sh
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"
}
}
```
```sh
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"
}
```
sh
cargo test
👤 Krakaw
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator