mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Just: add _if_not_on_ci_just helper, and add generation prerequisites
This commit is contained in:
@@ -72,8 +72,16 @@ _run_in DIR +ARGS:
|
|||||||
_run_in_semmle_code +ARGS: _require_semmle_code (_run_in "$SEMMLE_CODE" ARGS)
|
_run_in_semmle_code +ARGS: _require_semmle_code (_run_in "$SEMMLE_CODE" ARGS)
|
||||||
|
|
||||||
[no-cd, positional-arguments, no-exit-message]
|
[no-cd, positional-arguments, no-exit-message]
|
||||||
_just +ARGS:
|
@_just +ARGS:
|
||||||
|
echo "-> just $@"
|
||||||
"{{ JUST_EXECUTABLE }}" "$@"
|
"{{ JUST_EXECUTABLE }}" "$@"
|
||||||
|
|
||||||
|
[no-cd, positional-arguments]
|
||||||
|
@_if_not_on_ci_just +ARGS:
|
||||||
|
if [ "${GITHUB_ACTIONS:-}" != "true" ]; then \
|
||||||
|
echo "-> just $@"; \
|
||||||
|
"$JUST_EXECUTABLE" "$@"; \
|
||||||
|
fi
|
||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
_black *ARGS=".": (_run "uv" "run" "black" ARGS)
|
_black *ARGS=".": (_run "uv" "run" "black" ARGS)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import '../lib.just'
|
|||||||
|
|
||||||
install: (_bazel "run" "@codeql//rust:install")
|
install: (_bazel "run" "@codeql//rust:install")
|
||||||
|
|
||||||
build: (_build_dist "rust")
|
build: (_if_not_on_ci_just "generate" source_dir()) (_build_dist "rust")
|
||||||
|
|
||||||
generate: (_bazel "run" "@codeql//rust/codegen")
|
generate: (_bazel "run" "@codeql//rust/codegen")
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import "../../../misc/just/lib.just"
|
|
||||||
|
import "../../../lib.just"
|
||||||
|
|
||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
test *ARGS=".": (_just "generate") (_integration_test ARGS)
|
test *ARGS=".": (_if_not_on_ci_just "generate" source_dir()) (_integration_test ARGS)
|
||||||
|
|
||||||
# TODO in separate PR
|
# TODO in separate PR
|
||||||
# [no-cd]
|
# [no-cd]
|
||||||
|
|||||||
Reference in New Issue
Block a user