3 SCRIPT_FILE=$(readlink -f $0)
4 SCRIPT_DIR=$(dirname $SCRIPT_FILE)
6 OUTDIR=$SCRIPT_DIR/Artifacts
8 RETRY_CMD="$SCRIPT_DIR/tools/retry.sh"
9 TIMEOUT_CMD="$SCRIPT_DIR/tools/timeout.sh"
10 DOTNET_CMD="$RETRY_CMD $TIMEOUT_CMD 600 dotnet"
12 RUN_BUILD="$DOTNET_CMD msbuild $SCRIPT_DIR/build/build.proj /nologo"
15 echo "Usage: %0 [command] [args]"
17 echo " build [module] Build a specific module"
18 echo " full Build all modules in src/ directory"
19 echo " dummy Generate dummy assemblies of all modules"
20 echo " pack [version] Make a NuGet package with build artifacts"
21 echo " clean Clean all artifacts"
26 echo "No module specified."
29 if [ -d /nuget ]; then
30 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
32 $RUN_BUILD /t:restore /p:Project=$1 $NUGET_SOURCE_OPT
33 $RUN_BUILD /t:build /p:Project=$1
37 if [ -d /nuget ]; then
38 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
41 $RUN_BUILD /t:restore $NUGET_SOURCE_OPT
46 if [ -d /nuget ]; then
47 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
49 $RUN_BUILD /t:dummy $NUGET_SOURCE_OPT
50 $RUN_BUILD /t:afterdummy
55 if [ -z "$VERSION" ]; then
56 TIMESTAMP=$(date +"%s")
57 VERSION="5.0.0-local-$TIMESTAMP"
60 $RUN_BUILD /t:pack /p:Version=$VERSION
69 build|--build|-b) cmd_build $@ ;;
70 full |--full |-f) cmd_full_build $@ ;;
71 dummy|--dummy|-d) cmd_dummy_build $@ ;;
72 pack |--pack |-p) cmd_pack $@ ;;
73 clean|--clean|-c) cmd_clean $@ ;;