projects
/
platform
/
core
/
csapi
/
tizenfx.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix usages message of build.sh
[platform/core/csapi/tizenfx.git]
/
build.sh
diff --git
a/build.sh
b/build.sh
index
05ca8ad
..
7adf108
100755
(executable)
--- a/
build.sh
+++ b/
build.sh
@@
-5,34
+5,25
@@
SCRIPT_DIR=$(dirname $SCRIPT_FILE)
# Properties
OUTDIR=$SCRIPT_DIR/Artifacts
# Properties
OUTDIR=$SCRIPT_DIR/Artifacts
+
NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe"
NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe"
+MSBUILD_CMD="dotnet msbuild"
+
+RUN_BUILD="$MSBUILD_CMD $SCRIPT_DIR/build/build.proj"
usage() {
echo "Usage: $0 [options] [args]"
echo " Options:"
echo " -h, --help Show this usages message"
echo " -b, --build [module] Build a module"
usage() {
echo "Usage: $0 [options] [args]"
echo " Options:"
echo " -h, --help Show this usages message"
echo " -b, --build [module] Build a module"
- echo " -f, --full Build all modules in src/ directory
. (pkg/Tizen.NET.Private.sln)
"
+ echo " -f, --full Build all modules in src/ directory"
echo " -d, --dummy Build dummy modules"
echo " -p, --pack Make nuget packages"
echo " -c, --clean Clean all artifacts"
}
echo " -d, --dummy Build dummy modules"
echo " -p, --pack Make nuget packages"
echo " -c, --clean Clean all artifacts"
}
-dotnet_build() {
- if [ -d /nuget ]; then
- NUGET_SOURCE_OPT="--source /nuget"
- fi
- PROJ=$1; shift
- dotnet restore $PROJ $NUGET_SOURCE_OPT
- dotnet build $PROJ --no-restore --configuration=Release $@
-}
-
cmd_clean() {
cmd_clean() {
- rm -fr $OUTDIR
- LIST=$(find $SCRIPT_DIR -type d -a -name bin -o -name obj)
- for d in $LIST; do
- rm -fr $d
- done
+ $RUN_BUILD /t:clean
}
cmd_build() {
}
cmd_build() {
@@
-40,11
+31,17
@@
cmd_build() {
echo "No module specified."
exit 1
fi
echo "No module specified."
exit 1
fi
- dotnet_build $SCRIPT_DIR/src/$1 --output=$OUTDIR/bin
+ if [ -d /nuget ]; then
+ NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
+ fi
+ $RUN_BUILD /t:build /p:Project=$1 $NUGET_SOURCE_OPT
}
cmd_full_build() {
}
cmd_full_build() {
- dotnet_build $SCRIPT_DIR/pkg/Tizen.NET.Private.sln --output=$OUTDIR/bin
+ if [ -d /nuget ]; then
+ NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
+ fi
+ $RUN_BUILD /t:build $NUGET_SOURCE_OPT
}
cmd_pack() {
}
cmd_pack() {
@@
-59,7
+56,10
@@
cmd_pack() {
}
cmd_dummy_build() {
}
cmd_dummy_build() {
- dotnet_build $SCRIPT_DIR/pkg/Tizen.NET.Dummy.csproj
+ if [ -d /nuget ]; then
+ NUGET_SOURCE_OPT="/p:RestoreSources=/nuget"
+ fi
+ $RUN_BUILD /t:builddummy $NUGET_SOURCE_OPT
}
OPTS=`getopt -o hcbfpd --long help,clean,build,full,pack,dummy -n 'build' -- "$@"`
}
OPTS=`getopt -o hcbfpd --long help,clean,build,full,pack,dummy -n 'build' -- "$@"`