@adamhl8/configs 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,9 @@ export PATH := justfile_directory() + "/node_modules/.bin:" + env("PATH")
|
|
|
8
8
|
# runs cmd if the condition command succeeds, echoing cmd only when it runs
|
|
9
9
|
run-when(cmd, condition) := f"if {{condition}}; then echo {{style("command", cmd)}}; {{cmd}}; fi"
|
|
10
10
|
|
|
11
|
+
# run if not in CI, the repo has a root module, and the aws profile exists on this machine
|
|
12
|
+
tofu-run-condition := '[ -z "${CI:-}" ] && ls *.tofu >/dev/null 2>&1 && aws configure list-profiles 2>/dev/null | grep -qx adamhl8'
|
|
13
|
+
|
|
11
14
|
# public recipes are thin wrappers over private _recipes so an override can still call the original
|
|
12
15
|
# e.g. `prepare: _prepare` + extra lines
|
|
13
16
|
|
|
@@ -17,6 +20,7 @@ _prepare:
|
|
|
17
20
|
adamhl8-gitignore
|
|
18
21
|
adamhl8-bunfig
|
|
19
22
|
oxfmt bunfig.toml
|
|
23
|
+
@{{ run-when("tofu init -upgrade", tofu-run-condition) }}
|
|
20
24
|
|
|
21
25
|
bump-deps: _bump-deps
|
|
22
26
|
_bump-deps:
|
|
@@ -27,8 +31,7 @@ _bump-deps:
|
|
|
27
31
|
|
|
28
32
|
tofu-check: _tofu-check
|
|
29
33
|
_tofu-check:
|
|
30
|
-
|
|
31
|
-
@{{ run-when("tofu plan -detailed-exitcode -concise -compact-warnings", '[ -z "${CI:-}" ] && ls *.tofu >/dev/null 2>&1 && aws configure list-profiles 2>/dev/null | grep -qx adamhl8') }}
|
|
34
|
+
@{{ run-when("tofu plan -detailed-exitcode -concise -compact-warnings", tofu-run-condition) }}
|
|
32
35
|
|
|
33
36
|
lint: _lint
|
|
34
37
|
_lint:
|