#!/bin/bash
+USAGE="usage:
+ tizenpkg build [target OBS project]
+Build package at remote build server, the default target OBS project
+is home:<user_id>:branches:Trunk
+options:
+ -h print this info
+"
die()
{
echo "Fatal Error:"
echo " " $1
+ echo "$USAGE"
exit
}
+while :
+do
+ case $1 in
+ -h) echo "$USAGE"
+ exit
+ ;;
+ *) target_obsproject=$1
+ break
+ ;;
+ esac
+ shift
+done
+
git branch -a|sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'|grep "release" > /dev/null 2>&1 || die "Please run this command under release branch"
git status|grep "modified">/dev/null 2>&1 &&die "Please save you local changes before this command, eg git commit"
echo "Submiting your changes to build server"
-curl -s -i -u$user:$passwd -Fname=package.tar.bz2 -Ffile0=@package.tar.bz2 -Fjson='{"parameter": [{"name": "package.tar.bz2", "file": "file0"},{"name":"pkg", "value":"'$prj_name'"},{"name":"obsproject","value":"'$1'"}]}' -FSubmit=Build "$HUDSON_SERVER/job/build/build"
+curl -s -i -u$user:$passwd -Fname=package.tar.bz2 -Ffile0=@package.tar.bz2 -Fjson='{"parameter": [{"name": "package.tar.bz2", "file": "file0"},{"name":"pkg", "value":"'$prj_name'"},{"name":"obsproject","value":"'$target_obsproject'"}]}' -FSubmit=Build "$HUDSON_SERVER/job/build/build"
sleep 0.5
last_id=`curl -s -u$user:$passwd "$HUDSON_SERVER/job/build/lastBuild/buildNumber"`
#!/bin/bash
USAGE="usage:
- tizenpkg packaging <git object> [-s] [-f spec_file]
+ tizenpkg packaging <git object> [-s]
options:
-s silence remove patch without question
- -f specify a spec file
-h print this info
"