Skip to content

Commit 5c754bc

Browse files
committed
Add started hook and bump version to 0.1.50
Document a new `started.sh` lifecycle hook in README and add it to the default hooks mapping so repositories can run tasks when the Konta daemon starts. Also update the application version constant from 0.1.49 to 0.1.50 in cmd/konta/main.go to reflect this change.
1 parent f9150d2 commit 5c754bc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Konta supports lifecycle hooks that allow you to run custom scripts at different
239239
- `pre.sh` — Runs before any changes are applied. Use this for tasks like backing up data, sending notifications, or performing checks. If this script exits with a non-zero status, the deployment will be aborted, and the `failure.sh` hook will be triggered.
240240
- `success.sh` — Runs after successful deployment. Use this for tasks like clearing caches, sending success notifications, or performing post-deploy checks.
241241
- `failure.sh` — Runs if deployment fails. Use this for tasks like sending failure notifications, rolling back changes, or performing cleanup.
242+
- `started.sh` — Runs when the Konta daemon starts up. Use this for initialization tasks, notifications, or cleanup actions.
242243
- `post_update.sh` — Runs after Konta itself is updated. Use this for tasks like restarting the Konta daemon or performing any necessary migrations.
243244

244245
## Commands
@@ -303,12 +304,13 @@ logging:
303304
# Update behavior for Konta itself. By default with `notify`, it will log when updates are available, and you can choose when to update. If set to 'auto', Konta will automatically check for updates and install them (safe minor versions only). Set to 'false' or omit to disable update checks entirely.
304305
konta_updates: notify
305306

306-
# Optional. You can redefine hooks paths here if you want to use different names or locations for your hook scripts. By default, Konta looks for `pre.sh`, `success.sh`, `failure.sh`, and `post_update.sh` in the `{path}/hooks/` directory of your repository.
307+
# Optional. You can redefine hooks paths here if you want to use different names or locations for your hook scripts. By default, Konta looks for scripts in the `{path}/hooks/` directory of your repository.
307308
hooks:
308309
pre: pre.sh
309310
success: success.sh
310311
failure: failure.sh
311312
post_update: post_update.sh
313+
started: started.sh
312314
```
313315
314316
## Updates

cmd/konta/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/talyguryn/konta/internal/logger"
1010
)
1111

12-
const Version = "0.1.49"
12+
const Version = "0.1.50"
1313

1414
func main() {
1515
if len(os.Args) < 2 {

0 commit comments

Comments
 (0)