mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: bazel packaging
This commit is contained in:
9
rust/tools/BUILD.bazel
Normal file
9
rust/tools/BUILD.bazel
Normal file
@@ -0,0 +1,9 @@
|
||||
load("//misc/bazel:pkg.bzl", "codeql_pkg_files")
|
||||
|
||||
codeql_pkg_files(
|
||||
name = "tools",
|
||||
exes = [
|
||||
"index.sh",
|
||||
],
|
||||
visibility = ["//rust:__pkg__"],
|
||||
)
|
||||
17
rust/tools/index.sh
Executable file
17
rust/tools/index.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# TODO move this to rust code
|
||||
|
||||
inputs=($(find -name Cargo.toml))
|
||||
|
||||
if [ "${#inputs}" -eq 0 ]; then
|
||||
inputs=($(find -name rust-project.json))
|
||||
if [ "${#inputs}" -eq 0 ]; then
|
||||
inputs=($(find -name '*.rs'))
|
||||
if [ "${#inputs}" -eq 0 ]; then
|
||||
echo "no source files found" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$CODEQL_EXTRACTOR_RUST_ROOT/tools/$CODEQL_PLATFORM/extractor" "${inputs[@]}"
|
||||
Reference in New Issue
Block a user