summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-03-06 15:42:12 +0100
committerEike Ziller <eike.ziller@digia.com>2013-03-11 12:04:13 +0100
commitf2eaa573d6b5b56612c09713eb9a957cedfc60e9 (patch)
treec63f35b4ec240e152620121bcc7bf8a578c51094 /scripts
parent17dca2450ae3e7963f32e0cf5f35d98f68a39d38 (diff)
downloadqt-creator-f2eaa573d6b5b56612c09713eb9a957cedfc60e9.tar.gz
Create source zip with windows line endings.
The used method is similar to what is done for Qt5 Task-number: QTCREATORBUG-8651 Change-Id: I6ac58b4410c03d3f650df04f4fb5425dcfe5e03b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/createSrcAndDocPackage.sh30
1 files changed, 21 insertions, 9 deletions
diff --git a/scripts/createSrcAndDocPackage.sh b/scripts/createSrcAndDocPackage.sh
index fc96e0846c..29ee946eff 100755
--- a/scripts/createSrcAndDocPackage.sh
+++ b/scripts/createSrcAndDocPackage.sh
@@ -6,7 +6,7 @@ if [[ $# != 2 ]]; then
usage:
$0 <refspec> <version>
- Creates tar and zip source package from <refspec> and documentation-zip from current checkout.
+ Creates tar and zip source package from <refspec>.
Files and directories are named after <version>.
example:
$0 origin/2.2 2.2.0
@@ -17,14 +17,26 @@ fi
BRANCH=$1
VERSION=$2
cd `dirname $0`/..
+RESULTDIR=`pwd`
echo "Creating tar archive..."
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ ${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
+
echo "Creating zip archive..."
-git archive --format=zip --prefix=qt-creator-${VERSION}-src/ ${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1
-#echo "Creating documentation..."
-#rm -r doc/html
-#qmake -r && make docs_online || exit 1
-#cd doc
-#cp -r html qt-creator-${VERSION}
-#zip -r ../qt-creator-${VERSION}-doc.zip qt-creator-${VERSION}
-#rm -r qt-creator-${VERSION}
+# untargz the sources for the revision into temporary dir
+TEMPSOURCES=`mktemp -d -t qtcCreatorSourcePackage.XXXXXX`
+tar xzf qt-creator-${VERSION}-src.tar.gz -C "$TEMPSOURCES" || exit 1
+cd $TEMPSOURCES || exit 1
+# write filter for text files (for use with 'file' command)
+echo ".*:.*ASCII
+.*:.*directory
+.*:.*empty
+.*:.*POSIX
+.*:.*html
+.*:.*text" > __txtpattern || exit 1
+# list all files
+find qt-creator-${VERSION}-src > __packagedfiles || exit 1
+# record file types
+file -f __packagedfiles > __filetypes || exit 1
+# zip text files and binary files separately
+cat __filetypes | grep -f __txtpattern -v | cut -d: -f1 | zip -9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1
+cat __filetypes | grep -f __txtpattern | cut -d: -f1 | zip -l9q "$RESULTDIR"/qt-creator-${VERSION}-src.zip -@ || exit 1