Skip to content

bilus/bb-oneshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bb-oneshot

Utility for creating self-removing tasks in Babashka's bb.edn. It was primarily designed to work with kit-generator to add one-off tasks that the user will run after installing a kit module and that will self-destruct.

Usage

Add to your bb.edn:

{:deps {bilus/bb-oneshot {:mvn/version "0.1.0-SNAPSHOT"}}
 :tasks {:requires ([bilus.bb-oneshot :as oneshot])

         my-task {:doc  "Runs once then removes itself"
                  :task (do
                          (println "Doing something...")
                          (oneshot/remove-task! 'my-task))}}}

After the task is run via bb my-task and succeeds, it will remove itself.

License

Copyright © 2025 Marcin Bilski

Distributed under the Eclipse Public License version 1.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published