feat: Add if

This commit is contained in:
Robert Prehn 2023-10-04 19:45:55 +00:00
parent c8fd5e9f2d
commit 17d4654100
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -8,12 +8,12 @@ defmodule Mash.Job do
or the function returns true. Otherwise it will be skipped. The argument to an if function is the runner's \
job list.
- `:needs`: a list of job name atoms which are required before running this job. If a dependency fails or is skipped, \
this job will be skipped. You can also include {job_name, :optional} to indicate an optional dependency. \
this job will be skipped. You can also include `{job_name, :optional}` to indicate an optional dependency. \
Optional dependencies do not block a job from running if they are skipped, only if they fail.
- `:run`: a function with arity 1 that is the code to be executed for the job. See `Mash.Helpers` for shortcut functions.\
The argument to the run function is the PID of the IO device which is capturing the output of this job. You\
probably don't need this, but you might need it for certain libaries that need to be passed an explicit IO PID.
- `:env`: an array of {string, string} pairs which represent ENV variables (name first, then value).
- `:env`: an array of `{string, string}` pairs which represent ENV variables (name first, then value).
"""
defstruct name: nil, if: true, needs: [], run: nil, env: [], state: nil, task: nil, io_pid: nil

View file

@ -4,7 +4,7 @@ defmodule Mash.MixProject do
def project do
[
app: :mash,
version: "0.2.0",
version: "0.3.0",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),