Skip to content
Snippets Groups Projects
Commit bd8b23d4 authored by con's avatar con
Browse files

Make src packaging script more flexible.

parent 746b1fa8
No related branches found
No related tags found
No related merge requests found
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
if [[ $# != 2 ]]; then if [[ $# != 2 ]]; then
cat <<USAGE cat <<USAGE
usage: usage:
$0 <branch> <version> $0 <refspec> <version>
Creates tar and zip source package from origin/<branch> and documentation-zip from current checkout. Creates tar and zip source package from <refspec> and documentation-zip from current checkout.
Files and directories are named after <version>. Files and directories are named after <version>.
example: example:
$0 2.0.0 2.0.0-rc1 $0 origin/2.0.0 2.0.0-rc1
USAGE USAGE
exit 1 exit 1
fi fi
...@@ -18,9 +18,9 @@ BRANCH=$1 ...@@ -18,9 +18,9 @@ BRANCH=$1
VERSION=$2 VERSION=$2
cd `dirname $0`/.. cd `dirname $0`/..
echo "Creating tar archive..." echo "Creating tar archive..."
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1 git archive --format=tar --prefix=qt-creator-${VERSION}-src/ ${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
echo "Creating zip archive..." echo "Creating zip archive..."
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1 git archive --format=zip --prefix=qt-creator-${VERSION}-src/ ${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1
echo "Creating documentation..." echo "Creating documentation..."
rm -r doc/html rm -r doc/html
qmake -r && make docs_online || exit 1 qmake -r && make docs_online || exit 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment