Skip to content

Instantly share code, notes, and snippets.

@rhtyd rhtyd/rpm-centos6-build.sh
Last active May 11, 2016

Embed
What would you like to do?
Building CloudStack Packages
set -e
export ROOT=$PWD
git fetch origin
git clean -fdx
rm -fr deps/*jar deps/awsapi-lib deps/*.mar NONOSS
git checkout -- .
git checkout ${TAG}
export MINOR=${BUILD_ID}
export BRANCH=$(grep '^ <version>' pom.xml| cut -d'>' -f2 |cut -d'<' -f1)
export BASE_VERSION=$(echo $BRANCH | sed 's/\.[0-9]*-SNAPSHOT//g')
LIBS=NONOSS
git clone https://github.com/rhtyd/cloudstack-nonoss.git $LIBS
if [ "$BRANCH" = "4.2" ]; then
cp -r $LIBS/*.jar $LIBS/awsapi-lib/ $LIBS/*.mar deps
fi
cd $LIBS
bash -x install-non-oss.sh
cd $ROOT
cp $LIBS/vhd-util scripts/vm/hypervisor/xenserver/
chmod +x scripts/vm/hypervisor/xenserver/vhd-util
if [ "$BRANCH" = "master" ] || [ $(echo $BASE_VERSION"<4.6" | bc -l ) -eq 1 ]; then
rm -f server/test/org/apache/cloudstack/network/lb/CertServiceTest.java
rm -f utils/src/test/java/org/apache/cloudstack/utils/hypervisor/HypervisorUtilsTest.java
fi
cd $ROOT
# Detect if it&apos;s 4.6+ or not
if [ -f "packaging/centos63/package.sh" ]
then
cd packaging/centos63
else
cd packaging
fi
sed -i "s/^.*DEFREL=.*$/ DEFREL='-D_rel ${MINOR}'/g" package.sh
bash -x package.sh -p noredist -d centos63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.