Skip to content

Commit

Permalink
Merge branch 'tdstein/release' into tdstein/jupyterlab-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein authored Oct 14, 2023
2 parents feea556 + 42c65fc commit e097389
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
26 changes: 25 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
alias a := all
alias b := build
alias c := clean
alias co := cover
alias i := image
alias im := image
alias l := lint
alias r := run
alias t := test
Expand Down Expand Up @@ -40,6 +41,7 @@ _uid_args := if os_family() == "unix" {
""
}

# Quick start
default:
#!/usr/bin/env bash
set -eou pipefail
Expand All @@ -49,6 +51,20 @@ default:
just web
just build

# Executes command against every justfile where avaiable. WARNING your mileage may very.
all +args='default':
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
# For each justfile, check if the first argument exists, and then execute it.
for f in `find . -name justfile`; do
arg=`echo {{ args }} | awk '{print $1;}'`
if just -f $f --show $arg &>/dev/null; then
just _with_docker just -f $f {{ args }}
fi
done

# Executes commands in ./test/bats/justfile. Equivalent to `just test/bats/`, but inside of Docker (i.e., just _with_docker just test/bats/).
bats *args:
#!/usr/bin/env bash
Expand Down Expand Up @@ -97,6 +113,14 @@ executable-path:
just _with_docker echo '$(./scripts/get-executable-path.bash {{ _cmd }} $(just version) $(go env GOHOSTOS) $(go env GOHOSTARCH))'

# Fixes linting errors
fix:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
./scripts/ccheck.py ./scripts/ccheck.config --fix

# Build the image. Typically does not need to be done very often.
image:
#!/usr/bin/env bash
Expand Down
4 changes: 4 additions & 0 deletions test/bats/justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
alias c := clean
alias i := install
alias t := test

_with_debug := if env_var_or_default("DEBUG", "true") == "true" {
"set -x pipefail"
} else {
Expand Down
4 changes: 4 additions & 0 deletions test/cy/justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
alias c := clean
alias i := install
alias t := test

_with_debug := if env_var_or_default("DEBUG", "true") == "true" {
"set -x pipefail"
} else {
Expand Down

0 comments on commit e097389

Please sign in to comment.