From 482cc782982aad63627d96af98a603f714a103d1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 29 Nov 2013 14:49:46 +0100 Subject: more work on tarballing --- bin/build-rpm-package | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'bin/build-rpm-package') diff --git a/bin/build-rpm-package b/bin/build-rpm-package index c9f4e10..6edd039 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -185,11 +185,15 @@ build_packages() { git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" cd $TEMP_DIR rm -Rf "$PROJECT/.git" + cp $PROJECT/$PROJECT.spec . + UPSTREAM_VERSION=$(cat $PROJECT.spec | egrep "^Version:.*" | awk '{ print $2 }') + GITREV=$(cd $PROJECT && gitrevno && cd - 1>/dev/null) + mv $TEMP_DIR/$PROJECT $TEMP_DIR/$PROJECT-$UPSTREAM_VERSION - tar -czf ~/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $TEMP_DIR/$PROJECT-$UPSTREAM_VERSION - cp $PROJECT/$PROJECT.spec .. + tar -czf ~/rpmbuild/SOURCES/$PROJECT-$UPSTREAM_VERSION.tar.gz $PROJECT-$UPSTREAM_VERSION cd && rm $TEMP_DIR/$PROJECT -Rf + cat "$PROJECT_DIR/RPM_BUILDS_FOR" | egrep -v '(^$|^#.*$)' | while read line; do l_DIST="$(echo ${line/: /:} | cut -d":" -f1 | tr [:upper:] [:lower:])" l_CODENAMES="${CODENAMES:-$(echo ${line/: /:} | cut -d":" -f2- | tr [:upper:] [:lower:])}" @@ -198,18 +202,6 @@ build_packages() { test -z $CODENAMES || echo $line | grep $CODENAMES || break - TEMP_DIR="$(mktemp -d --tmpdir=$TEMP_BASE)" - mkdir -p "$TEMP_DIR/$PROJECT" - chmod 2770 "$TEMP_DIR" -Rf - - cd "$PROJECT_DIR" - git clone --local "$PROJECT_DIR" "$TEMP_DIR/$PROJECT/" - cd "$TEMP_DIR/$PROJECT" - git checkout $CHECKOUT || git checkout master - - GITREV=$(gitrevno) - UPSTREAM_VERSION=$(cat $PROJECT.spec | egrep "^Version:.*" | awk '{ print $2 }') - # modify the section for non-main package builds ### TODO: How to host different builds (releases / nightlies in the same repository???) -- cgit v1.2.3