You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by dn...@apache.org on 2015/05/06 14:04:46 UTC
[1/2] qpid-proton git commit: NO-JIRA: improvements to export.sh
Repository: qpid-proton
Updated Branches:
refs/heads/master dcd4e47df -> 9a812bab4
NO-JIRA: improvements to export.sh
+ allow specific tag to be specified as cmdline arg
+ confirm the tag exists before proceeding
+ use the version.txt from that tag as the tar prefix folder
+ re-run the version.sh script before packaging to ensure the correct
version is set
+ add .gitattributes to exclude .gitignore files from the exported tar
Closes #28
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a90e2b1c
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a90e2b1c
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a90e2b1c
Branch: refs/heads/master
Commit: a90e2b1c04dd8a03d240b83ed9b67c3f7611a66c
Parents: 703db66
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Wed May 6 12:03:58 2015 +0100
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Wed May 6 12:06:44 2015 +0100
----------------------------------------------------------------------
.gitattributes | 2 ++
bin/export.sh | 30 ++++++++++++++++++++++--------
2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a90e2b1c/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..0508865
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+.gitattributes export-ignore
+.gitignore export-ignore
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a90e2b1c/bin/export.sh
----------------------------------------------------------------------
diff --git a/bin/export.sh b/bin/export.sh
index 85ef2c7..13fdbd1 100755
--- a/bin/export.sh
+++ b/bin/export.sh
@@ -28,7 +28,8 @@ SRC=$(dirname $(dirname $(readlink -f $0)))
usage()
{
- echo "Usage: ${ME} [DIR]"
+ echo
+ echo "Usage: ${ME} [DIR] [TAG]"
exit 1
}
@@ -39,14 +40,24 @@ cleanup()
[ ${WORKDIR} ] && [ -d ${WORKDIR} ] && rm -rf ${WORKDIR}
}
-if [ $# == 1 ]; then
- DIR=$1
-elif [ $# == 0 ]; then
- DIR=$PWD
-else
+DIR=$PWD
+TAG=$(git describe --tags --always)
+
+##
+## Allow overrides to be passed on the cmdline
+##
+if [ $# -gt 2 ]; then
usage
+elif [ $# -ge 1 ]; then
+ DIR=$1
+ if [ $# -eq 2 ]; then
+ TAG=$2
+ fi
fi
+# verify the tag exists
+git rev-list -1 tags/${TAG} -- >/dev/null || usage
+
WORKDIR=$(mktemp -d)
##
@@ -54,15 +65,18 @@ WORKDIR=$(mktemp -d)
##
(
cd ${SRC}
- TAG=$(git describe --tags --always)
MTIME=$(date -d @`git log -1 --pretty=format:%ct tags/${TAG}` '+%Y-%m-%d %H:%M:%S')
ARCHIVE=$DIR/qpid-proton-${TAG}.tar.gz
+ VERSION=$(git show tags/${TAG}:version.txt)
+ PREFIX=qpid-proton-${VERSION}
[ -d ${WORKDIR} ] || mkdir -p ${WORKDIR}
- git archive --format=tar --prefix=qpid-proton-${TAG}/ tags/${TAG} \
+ git archive --format=tar --prefix=${PREFIX}/ tags/${TAG} \
| tar -x -C ${WORKDIR}
+ ${SRC}/bin/version.sh ${WORKDIR}/${PREFIX} ${VERSION}
cd ${WORKDIR}
tar -c -z \
--owner=root --group=root --numeric-owner \
--mtime="${MTIME}" \
-f ${ARCHIVE} .
+ echo "${ARCHIVE}"
)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-proton git commit: Merge branch 'fix-export-script'
Posted by dn...@apache.org.
Merge branch 'fix-export-script'
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9a812bab
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9a812bab
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9a812bab
Branch: refs/heads/master
Commit: 9a812bab4623fa6bcbea91f0d80797a2fa04eb5e
Parents: dcd4e47 a90e2b1
Author: Dominic Evans <do...@uk.ibm.com>
Authored: Wed May 6 13:03:42 2015 +0100
Committer: Dominic Evans <do...@uk.ibm.com>
Committed: Wed May 6 13:03:42 2015 +0100
----------------------------------------------------------------------
.gitattributes | 2 ++
bin/export.sh | 30 ++++++++++++++++++++++--------
2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org