cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [34/50] [abbrv] git commit: updated refs/heads/ui-restyle to c64bfa5
Date Thu, 20 Feb 2014 19:17:40 GMT
Dynamically detect the current branch and remove the build date from the systemvm name. This
makes it easier to push them to the download location automagically.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fefddc06
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fefddc06
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fefddc06

Branch: refs/heads/ui-restyle
Commit: fefddc062486ed0c997309b719fd4b2f89b9b62c
Parents: 808c6df6
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Feb 19 09:36:03 2014 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Feb 19 09:36:03 2014 +0100

----------------------------------------------------------------------
 tools/appliance/build.sh | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fefddc06/tools/appliance/build.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh
index 2e8bc88..658aa8d 100644
--- a/tools/appliance/build.sh
+++ b/tools/appliance/build.sh
@@ -26,7 +26,10 @@ else
 fi
 
 build_date=`date +%Y-%m-%d`
-branch="master"
+branch=`git status | grep '# On branch' | awk '{print $4}'`
+if [ -z "$branch" ] ; then
+    branch=unknown
+fi
 rootdir=$PWD
 
 # Initialize veewee and dependencies
@@ -69,10 +72,10 @@ if [ $? == 0 ]; then
   set -e
   vboxmanage internalcommands converttoraw -format vdi "$hdd_path" img.raw
   faketime '2010-01-01' vhd-util convert -s 0 -t 1 -i img.raw -o stagefixed.vhd
-  faketime '2010-01-01' vhd-util convert -s 1 -t 2 -i stagefixed.vhd -o $appliance-$build_date-$branch-xen.vhd
+  faketime '2010-01-01' vhd-util convert -s 1 -t 2 -i stagefixed.vhd -o $appliance-$branch-xen.vhd
   rm *.bak
-  bzip2 $appliance-$build_date-$branch-xen.vhd
-  echo "$appliance exported for Xen: dist/$appliance-$build_date-$branch-xen.vhd.bz2"
+  bzip2 $appliance-$branch-xen.vhd
+  echo "$appliance exported for Xen: dist/$appliance-$branch-xen.vhd.bz2"
 else
   echo "** Skipping $appliance export for Xen: faketime or vhd-util command is missing. **"
   echo "** faketime source code is available from https://github.com/wolfcw/libfaketime **"
@@ -83,27 +86,27 @@ set -e
 
 # Export for KVM
 vboxmanage internalcommands converttoraw -format vdi "$hdd_path" raw.img
-qemu-img convert -f raw -c -O qcow2 raw.img $appliance-$build_date-$branch-kvm.qcow2
+qemu-img convert -f raw -c -O qcow2 raw.img $appliance-$branch-kvm.qcow2
 rm raw.img
-bzip2 $appliance-$build_date-$branch-kvm.qcow2
-echo "$appliance exported for KVM: dist/$appliance-$build_date-$branch-kvm.qcow2.bz2"
+bzip2 $appliance-$branch-kvm.qcow2
+echo "$appliance exported for KVM: dist/$appliance-$branch-kvm.qcow2.bz2"
 
 # Export both ova and vmdk for VMWare
-vboxmanage clonehd $hdd_uuid $appliance-$build_date-$branch-vmware.vmdk --format VMDK
-bzip2 $appliance-$build_date-$branch-vmware.vmdk
-echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.vmdk.bz2"
-vboxmanage export $machine_uuid --output $appliance-$build_date-$branch-vmware.ovf
-mv $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig
-java -cp convert Convert convert_ovf_vbox_to_esx.xslt $appliance-$build_date-$branch-vmware.ovf-orig
$appliance-$build_date-$branch-vmware.ovf
-tar -cf $appliance-$build_date-$branch-vmware.ova $appliance-$build_date-$branch-vmware.ovf
$appliance-$build_date-$branch-vmware-disk1.vmdk
-rm -f $appliance-$build_date-$branch-vmware.ovf $appliance-$build_date-$branch-vmware.ovf-orig
$appliance-$build_date-$branch-vmware-disk1.vmdk
-echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware.ova"
+vboxmanage clonehd $hdd_uuid $appliance-$branch-vmware.vmdk --format VMDK
+bzip2 $appliance-$branch-vmware.vmdk
+echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.vmdk.bz2"
+vboxmanage export $machine_uuid --output $appliance-$branch-vmware.ovf
+mv $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig
+java -cp convert Convert convert_ovf_vbox_to_esx.xslt $appliance-$branch-vmware.ovf-orig
$appliance-$branch-vmware.ovf
+tar -cf $appliance-$branch-vmware.ova $appliance-$branch-vmware.ovf $appliance-$branch-vmware-disk1.vmdk
+rm -f $appliance-$branch-vmware.ovf $appliance-$branch-vmware.ovf-orig $appliance-$branch-vmware-disk1.vmdk
+echo "$appliance exported for VMWare: dist/$appliance-$branch-vmware.ova"
 
 # Export for HyperV
-vboxmanage clonehd $hdd_uuid $appliance-$build_date-$branch-hyperv.vhd --format VHD
+vboxmanage clonehd $hdd_uuid $appliance-$branch-hyperv.vhd --format VHD
 # HyperV doesn't support import a zipped image from S3, but we create a zipped version to
save space on the jenkins box
-zip $appliance-$build_date-$branch-hyperv.vhd.zip $appliance-$build_date-$branch-hyperv.vhd
-echo "$appliance exported for HyperV: dist/$appliance-$build_date-$branch-hyperv.vhd"
+zip $appliance-$branch-hyperv.vhd.zip $appliance-$branch-hyperv.vhd
+echo "$appliance exported for HyperV: dist/$appliance-$branch-hyperv.vhd"
 
 mv *-hyperv.vhd *-hyperv.vhd.zip *.bz2 *.ova dist/
 


Mime
View raw message