3 SCRIPT_FILE=$(readlink -f $0)
4 SCRIPT_DIR=$(dirname $SCRIPT_FILE)
6 OUTDIR=$SCRIPT_DIR/Artifacts
8 NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe"
9 RETRY_CMD="$SCRIPT_DIR/tools/retry.sh"
10 TIMEOUT_CMD="$SCRIPT_DIR/tools/timeout.sh"
11 DOTNET_CMD="$RETRY_CMD $TIMEOUT_CMD 600 dotnet"
13 RUN_BUILD="$DOTNET_CMD msbuild $SCRIPT_DIR/build/build.proj /nologo"
16 echo "Usage: %0 [command] [args]"
18 echo " build [module] Build a specific module"
19 echo " full Build all modules in src/ directory"
20 echo " dummy Generate dummy assemblies of all modules"
21 echo " pack [version] Make a NuGet package with build artifacts"
22 echo " clean Clean all artifacts"
27 echo "No module specified."
30 if [ -d /nuget ]; then
31 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
33 $RUN_BUILD /t:restore /p:Project=$1 $NUGET_SOURCE_OPT
34 $RUN_BUILD /t:build /p:Project=$1
38 if [ -d /nuget ]; then
39 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
42 $RUN_BUILD /t:restore $NUGET_SOURCE_OPT
47 if [ -d /nuget ]; then
48 NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
50 $RUN_BUILD /t:dummy $NUGET_SOURCE_OPT
51 $RUN_BUILD /t:afterdummy
57 if [ -z "$VERSION" ]; then
58 TIMESTAMP=$(date +"%s")
59 VERSION="5.0.0-local-$TIMESTAMP"
61 if [ -z "$VERSION_INTERNAL" ]; then
62 VERSION_INTERNAL=$VERSION
65 $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.nuspec -NoPackageAnalysis -Version $VERSION -BasePath $SCRIPT_DIR -OutputDirectory $OUTDIR
66 $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.API5.nuspec -NoPackageAnalysis -Version $VERSION -BasePath $SCRIPT_DIR -OutputDirectory $OUTDIR
67 $NUGET_CMD pack $SCRIPT_DIR/pkg/Tizen.NET.Internals.nuspec -NoPackageAnalysis -Version $VERSION_INTERNAL -BasePath $SCRIPT_DIR -OutputDirectory $OUTDIR
76 build|--build|-b) cmd_build $@ ;;
77 full |--full |-f) cmd_full_build $@ ;;
78 dummy|--dummy|-d) cmd_dummy_build $@ ;;
79 pack |--pack |-p) cmd_pack $@ ;;
80 clean|--clean|-c) cmd_clean $@ ;;