[rkward] scripts: Some updates to packaging scripts: Avoid re-building the tar.gz
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Sat Mar 7 07:13:47 UTC 2015
Git commit 2fa501f618eb4ae249d8ef5ad7817e0b7d11eeae by Thomas Friedrichsmeier.
Committed on 07/03/2015 at 07:10.
Pushed by tfry into branch 'master'.
Some updates to packaging scripts: Avoid re-building the tar.gz
M +3 -3 scripts/make_debian_package.sh
M +10 -7 scripts/makeosc_upload.sh
M +4 -3 scripts/makeppa_upload.sh
http://commits.kde.org/rkward/2fa501f618eb4ae249d8ef5ad7817e0b7d11eeae
diff --git a/scripts/make_debian_package.sh b/scripts/make_debian_package.sh
index ad1b10c..162cea4 100755
--- a/scripts/make_debian_package.sh
+++ b/scripts/make_debian_package.sh
@@ -11,10 +11,10 @@ if [ -z "`head -n 1 ${BASEDIR}/debian/changelog | grep "rkward (${VERSION}-"`" ]
exit 1
fi
-# create source snapshot
+# check for source snapshot
if [ ! -f ${BASEDIR}/rkward-$VERSION.tar.gz ]; then
- cd ${BASEDIR}
- ${BASEDIR}/scripts/makedist.sh $VERSION
+ echo "${BASEDIR}/rkward-$VERSION.tar.gz not found. Run makedist.sh, first."
+ exit 1
fi
cp ${BASEDIR}/rkward-$VERSION.tar.gz $DEBTEMPDIR/rkward_$VERSION.orig.tar.gz
diff --git a/scripts/makeosc_upload.sh b/scripts/makeosc_upload.sh
index 983fd38..3331966 100755
--- a/scripts/makeosc_upload.sh
+++ b/scripts/makeosc_upload.sh
@@ -7,8 +7,12 @@ OSCREPOS="home:tfry-suse:rkward-devel"
cd `dirname $0`/..
BASEDIR=`pwd`
VERSION=`${BASEDIR}/scripts/getversion.sh ${1}`
+if [ ! -f "${BASEDIR}/rkward-$VERSION.tar.gz" ]; then
+ echo "${BASEDIR}/rkward-$VERSION.tar.gz not found. Run makedist.sh, first."
+ exit 1
+fi
# RPM does not accept dashes in the version name...
-VERSION=`echo -n ${VERSION} | sed -e 's/-/_/g'`
+RPMVERSION=`echo -n ${VERSION} | sed -e 's/-/_/g'`
OSCTEMPDIR=${BASEDIR}/osctemp
rm -rf ${OSCTEMPDIR}
mkdir ${OSCTEMPDIR}
@@ -19,13 +23,12 @@ osc co ${OSCREPOS}
cd ${OSCREPOS}/rkward
osc remove *.tar.gz
-# create source snapshot
+# copy source snapshot
cd ${BASEDIR}
-${BASEDIR}/scripts/makedist.sh $VERSION
-cp ${BASEDIR}/rkward-$VERSION.tar.gz $OSCTEMPDIR/${OSCREPOS}/rkward/rkward-$VERSION.tar.gz
-osc add $OSCTEMPDIR/${OSCREPOS}/rkward/rkward-$VERSION.tar.gz
+cp ${BASEDIR}/rkward-$VERSION.tar.gz $OSCTEMPDIR/${OSCREPOS}/rkward/rkward-$RPMVERSION.tar.gz
+osc add $OSCTEMPDIR/${OSCREPOS}/rkward/rkward-$RPMVERSION.tar.gz
cd $OSCTEMPDIR/${OSCREPOS}/rkward/
-sed -i rkward.spec -e "s/Version:.*$/Version: ${VERSION}/"
-osc commit -m "New development snapshot: ${VERSION}"
+sed -i rkward.spec -e "s/Version:.*$/Version: ${RPMVERSION}/"
+osc commit -m "New development snapshot: ${RPMVERSION}"
diff --git a/scripts/makeppa_upload.sh b/scripts/makeppa_upload.sh
index df49ca0..d9e8dfa 100755
--- a/scripts/makeppa_upload.sh
+++ b/scripts/makeppa_upload.sh
@@ -14,16 +14,17 @@ if [ "${1}" == "--stable" ]; then
shift
PPAIDS="rkward-stable rkward-stable-cran"
PPAVERSIONSTRING=".1rkward.stable"
- # do not re-create tarball
VERSION=`${BASEDIR}/scripts/getversion.sh ${2}`
else
PPAIDS="rkward-devel rkward-devel-cran"
PPAVERSIONSTRING=".0rkward.devel"
- # first create source snapshot
VERSION=`${BASEDIR}/scripts/getversion.sh ${1}`
- ${BASEDIR}/scripts/makedist.sh $VERSION
fi
+if [ ! -f "${BASEDIR}/rkward-$VERSION.tar.gz" ]; then
+ echo "${BASEDIR}/rkward-$VERSION.tar.gz not found. Run makedist.sh, first."
+ exit 1
+fi
cp ${BASEDIR}/rkward-$VERSION.tar.gz $PPATEMPDIR/rkward_$VERSION.orig.tar.gz
function doSourceUpload {
More information about the rkward-tracker
mailing list