#!/bin/sh # # Package Openbravo ERP obx, sources, appliances and upload to tecnicia14 set -e if [ $(id -un) != packager ]; then echo 'You need to be logged as user "packager" to run this script' exit 1 fi EXPECTED_ARGS=1 if [ $# -lt $EXPECTED_ARGS ] then echo "Usage: $(basename $0) RELEASE_TAG" >&2 exit 1 fi RELEASE_TAG=$1 FROMADDR="tde2-32@openbravo.com" TOADDR="staff.rm@openbravo.com" # Source: obx, tarball /opt/releaser/2.50/rel2.50_obx_mp.sh $RELEASE_TAG rsync -avHx --delete /tmp/$RELEASE_TAG/output/ openbravo@tecnicia14:releases/$RELEASE_TAG/ enotify $FROMADDR $TOADDR "$RELEASE_TAG" " The $RELEASE_TAG obx and tarball are available in: http://tecnicia14/releases/$RELEASE_TAG/appliances " # Appliances /opt/releaser/2.50/oberp-2.50-builder /tmp/$RELEASE_TAG/main-release $RELEASE_TAG $HOME//src/oberp-2.50-devel/ $RELEASE_TAG $RELEASE_TAG IMAGES=$(cat /tmp/oberp.$RELEASE_TAG.log | grep http://on.openbravo.com) scp /opt/releaser/2.50/rel2.50_images_mp.sh openbravo@tecnicia14: ssh openbravo@tecnicia14 ./rel2.50_images_mp.sh $RELEASE_TAG $HOME/releases/$RELEASE_TAG/appliances $IMAGES ssh openbravo@tecnicia14 rm -f rel2.50_images_mp.sh enotify $FROMADDR $TOADDR "$RELEASE_TAG" " The $RELEASE_TAG appliances is available in: http://tecnicia14/releases/$RELEASE_TAG/appliances " exit 0