3 SCRIPT_FILE=$(readlink -f $0)
4 SCRIPT_DIR=$(dirname $SCRIPT_FILE)
6 OUTDIR=$SCRIPT_DIR/Artifacts
8 RETRY_CMD="$SCRIPT_DIR/tools/scripts/retry.sh"
9 TIMEOUT_CMD="$SCRIPT_DIR/tools/scripts/timeout.sh"
10 DOTNET_CMD="$RETRY_CMD $TIMEOUT_CMD 600 dotnet"
12 RUN_BUILD="$DOTNET_CMD msbuild $SCRIPT_DIR/build/build.proj /nologo"
17 echo "Usage: $0 [command] [args]"
19 echo " build [module] Build a specific module"
20 echo " full Build all modules in src/ directory"
21 echo " dummy Generate dummy assemblies of all modules"
22 echo " pack [version] Make a NuGet package with build artifacts"
23 echo " clean Clean all artifacts"
28 echo "No module specified."
31 if [ -d /nuget ]; then
32 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
35 $RUN_BUILD /t:restore /p:Project=$PROJECT $NUGET_SOURCE_OPT $@
36 $RUN_BUILD /t:build /p:Project=$PROJECT $@
40 if [ -d /nuget ]; then
41 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
44 $RUN_BUILD /t:restore $NUGET_SOURCE_OPT $@
45 $RUN_BUILD /t:build $@
49 if [ -d /nuget ]; then
50 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
52 $RUN_BUILD /t:restore $NUGET_SOURCE_OPT
53 $RUN_BUILD /t:dummy $NUGET_SOURCE_OPT
58 if [ -z "$VERSION" ]; then
59 VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
62 $RUN_BUILD /t:pack /p:Version=$VERSION
71 build|--build|-b) cmd_build $@ ;;
72 full |--full |-f) cmd_full_build $@ ;;
73 dummy|--dummy|-d) cmd_dummy_build $@ ;;
74 pack |--pack |-p) cmd_pack $@ ;;
75 clean|--clean|-c) cmd_clean $@ ;;