From 0261307bc4df8af224b65fc0d1f75ec948f90e36 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 29 Jun 2020 10:29:38 +0200 Subject: [PATCH] Update of the repack script to integrate the https://github.com/opencollab/llvm-toolchain-integration-test-suite/ repo --- debian/orig-tar.sh | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 0b239974..94d5363d 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -33,6 +33,20 @@ if test -n "${JENKINS_HOME}"; then fi GIT_BASE_URL=https://github.com/llvm/llvm-project +GIT_TOOLCHAIN_CHECK=https://github.com/opencollab/llvm-toolchain-integration-test-suite.git + + +function reset-repo { + cd $1 + git clean -qfd + git checkout . + git remote update > /dev/null + git reset --hard origin/master > /dev/null + git clean -qfd + git checkout master > /dev/null + git pull + cd - +} PATH_DEBIAN="$(pwd)/$(dirname $0)/../" cd "$PATH_DEBIAN" @@ -41,11 +55,13 @@ if test -z "$MAJOR_VERSION"; then echo "Could not detect the major version" exit 1 fi + CURRENT_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1,p") if test -z "$CURRENT_VERSION"; then echo "Could not detect the full version" exit 1 fi + cd - &> /dev/null echo "MAJOR_VERSION=$MAJOR_VERSION / CURRENT_VERSION=$CURRENT_VERSION" if test -n "$1"; then @@ -84,21 +100,22 @@ cd git-archive if test -d $EXPORT_PATH/llvm-project; then echo "Updating repo in $EXPORT_PATH/llvm-project" # Update it - cd $EXPORT_PATH/llvm-project - git clean -qfd - git checkout . - git remote update > /dev/null - git reset --hard origin/master > /dev/null - git clean -qfd - git checkout master > /dev/null - git pull - cd .. + reset-repo $EXPORT_PATH/llvm-project else # Download it echo "Cloning the repo in $EXPORT_PATH/llvm-project" git clone $GIT_BASE_URL $EXPORT_PATH/llvm-project fi +if test -d $EXPORT_PATH/llvm-toolchain-integration-test-suite; then + echo "Updating repo in $EXPORT_PATH/llvm-toolchain-integration-test-suite" + # Update it + reset-repo $EXPORT_PATH/llvm-toolchain-integration-test-suite +else + echo "Clone llvm-toolchain-integration-test-suite into $EXPORT_PATH/llvm-toolchain-integration-test-suite" + git clone $GIT_TOOLCHAIN_CHECK $EXPORT_PATH/llvm-toolchain-integration-test-suite +fi + cd $EXPORT_PATH/llvm-project if test -z "$TAG" -a -z "$FINAL_RELEASE"; then # Building a branch @@ -142,8 +159,11 @@ rm -rf */www/ cd ../ BASE="llvm-toolchain-${MAJOR_VERSION}_${VERSION}" FILENAME="${BASE}.orig.tar.xz" + +cp -R llvm-toolchain-integration-test-suite llvm-project/integration-test-suite echo "Compressing to $FILENAME" tar Jcf $CURRENT_PATH/"$FILENAME" --exclude .git --transform="s|llvm-project|$BASE|" -C $EXPORT_PATH llvm-project +rm -rf llvm-project/integration-test-suite export DEBFULLNAME="Sylvestre Ledru" export DEBEMAIL="sylvestre@debian.org"