2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-24 20:20:33 +00:00

Numerous fixes to the alternate build mode

This commit is contained in:
Jarrod Johnson
2016-09-09 12:06:32 -04:00
committed by Victor Hu
parent c4ca70b7d2
commit dea4f9b707
2 changed files with 8 additions and 7 deletions

View File

@@ -174,7 +174,7 @@ fi
function setversionvars {
if [ ! -z "$USEGITVER" ]; then
VER=`git describe`
VER=${GITVER/-/.post}
VER=${VER/-/.post}
VER=${VER/-/.}
else
VER=`cat Version`

13
makerpm
View File

@@ -55,7 +55,7 @@ function makenoarch {
tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER" $RELEASE
rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER" $REL "$EASE"
RC=$?
if [ $RPMNAME = "xCAT-UI" ]; then
@@ -137,7 +137,7 @@ function makexcat {
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" $RELEASE
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE"
RC=$?
fi
}
@@ -170,7 +170,7 @@ function makegenesis {
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER" $RELEASE
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER" $REL "$EASE"
}
function makegenesisscripts {
@@ -190,7 +190,7 @@ function makegenesisscripts {
cd - >/dev/null
rm -f $RPMROOT/SRPMS/$RPMNAME-$ARCH-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER*rpm
echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER-snap*.noarch.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER" $RELEASE
rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE"
}
@@ -213,11 +213,12 @@ if [ -z "$1" ]; then
fi
OSNAME=$(uname)
if [ -z "$XCATVER"] ; then
if [ -z "$XCATVER" ] ; then
VER=`cat Version`
RELEASE="--define 'release 1'"
else
VER=$XCATVER
REL="--define"
EASE='release 1'
fi
if [ "$VERBOSE" = "1" -o "$VERBOSE" = "yes" ];then
QUIET=""