-
Notifications
You must be signed in to change notification settings - Fork 0
Home
caumond edited this page Jan 6, 2025
·
1 revision
- Clone the repo with `git clone ssh:[email protected]:hephaistox/automaton-build.git`
- Do `bb lconnect` to start a repl on port `1234`
- Tests actions your own new or modified actions
- Optional: After some modifications, use `bb wf-4` to lint, format and test the code to check your code tests are passing
- Optional: Use a `bb test all` to test more deeply, with not only test/bb code, but also unit tests and so on..
- Commit and push your modification on branch `b`, it will retest the commit on a remote environment,
- Do `bb deploy -t v1.2.3 -m “tag message”` to push the modifications, this step won’t execute if
- you execute it before tests would have been finished early,
- the tests have failed
You’ll end-up with: a branch checked, tagged compiled together with its documentation on github.
You can also use:
- bb docs to manually rebuild an API modification, they’ll be visible on `https://hephaistox.github.io/automaton-build/`
- Update tags manually and push them to the repo, the clojars artefacts are automatically updated.
- `bb tasks` to see all available tasks.
This section will be fine tuned with next projects.
To integrate `automaton-build` into your project:
- Create `bb.edn` file at the root of your project with the following content:
{:deps {org.clojars.hephaistox/automaton-build #:mvn{:version "1.0.2"}}
:tasks {-base-deps {:doc "Dependencies for a task using bb"}
:requires [[automaton-build.tasks.common :as tasks-common]]}}
Which will:
- Add the `automaton-build` library dependency to enable its features.
- Add the `-base-deps` task to declare whatever is common to all tasks. It starts with `-` so it is not shown in the task list.
- Add the `requires` that enables `tasks-common` namespace for all tasks so you don’t have to repeat it.
- Add your custom tasks or use pre-defined ones from the `automaton-build.tasks` directory.
Example task for starting REPL:
repl {:depends [-base-deps]
:requires [[automaton-build.tasks.2 :as tasks-2]]
:extra-deps {}
:doc "Launch repl"
:enter (tasks-common/enter tasks-2/cli-opts (current-task))
:task (tasks-2/start-repl [:common-test :env-development-repl :build])}
Some tasks may require additional configuration. Set up a `project.edn` file in your project root to customize task behavior. For an example refer to the forbidden-words report task [automaton-build.tasks.tasks.3](src/bb/automaton_build/tasks/3.clj) and [project.edn file](project.edn)
Hephaistox (c) 2025