mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Add Bazel-based build system.
This commits a bazel-based build system for C# using `rules_dotnet`. External dependencies are managed via `paket`, and updates to the generated bazel files are done via `./update-deps.sh`. We're providing our own (minimal) test runner for `xunit` tests.
This commit is contained in:
16
csharp/update-deps.sh
Executable file
16
csharp/update-deps.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
MODE=${1:-install}
|
||||
if [ "$MODE" != "install" ] && [ "$MODE" != "update" ]; then
|
||||
echo "Invalid mode: $MODE. Valid modes are 'install' and 'update'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
DEP_DIR="$(pwd)"
|
||||
(dotnet tool restore && dotnet paket $MODE) || exit 1
|
||||
cd ../..
|
||||
tools/bazel run @rules_dotnet//tools/paket2bazel -- --dependencies-file "$DEP_DIR"/paket.dependencies --output-folder "$DEP_DIR"
|
||||
)
|
||||
Reference in New Issue
Block a user