forked from qt-creator/qt-creator
Source package creation script needs to differentiate branch vs version.
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Command line parameters
|
||||
if [[ $# != 1 ]]; then
|
||||
if [[ $# != 2 ]]; then
|
||||
cat <<USAGE
|
||||
usage:
|
||||
$0 <branch>
|
||||
$0 <branch> <version>
|
||||
|
||||
Creates tar and zip source package from origin/<branch> and documentation-zip from current checkout.
|
||||
Files and directories are named after <branch>.
|
||||
Files and directories are named after <version>.
|
||||
example:
|
||||
$0 2.0.0
|
||||
$0 2.0.0 2.0.0-rc1
|
||||
USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
VERSION=$1
|
||||
BRANCH=$1
|
||||
VERSION=$2
|
||||
cd `dirname $0`/..
|
||||
echo "Creating tar archive..."
|
||||
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
|
||||
git archive --format=tar --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} | gzip > qt-creator-${VERSION}-src.tar.gz || exit 1
|
||||
echo "Creating zip archive..."
|
||||
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${VERSION} > qt-creator-${VERSION}-src.zip || exit 1
|
||||
git archive --format=zip --prefix=qt-creator-${VERSION}-src/ origin/${BRANCH} > qt-creator-${VERSION}-src.zip || exit 1
|
||||
echo "Creating documentation..."
|
||||
rm -r doc/html
|
||||
qmake -r && make docs_online || exit 1
|
||||
|
||||
Reference in New Issue
Block a user