avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nielsbas...@apache.org
Subject avro git commit: AVRO-1825: Allow running build.sh dist under git
Date Sun, 17 Apr 2016 21:14:48 GMT
Repository: avro
Updated Branches:
  refs/heads/master e62b98c7c -> 499699087


AVRO-1825: Allow running build.sh dist under git


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/49969908
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/49969908
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/49969908

Branch: refs/heads/master
Commit: 4996990874d127f4908c9f55f7bc3a4334e2aed4
Parents: e62b98c
Author: Niels Basjes <nielsbasjes@apache.org>
Authored: Sun Apr 17 23:10:19 2016 +0200
Committer: Niels Basjes <nielsbasjes@apache.org>
Committed: Sun Apr 17 23:10:19 2016 +0200

----------------------------------------------------------------------
 CHANGES.txt |  2 ++
 build.sh    | 12 +++++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/49969908/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b25e781..9f76911 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -22,6 +22,8 @@ Trunk (not yet released)
     AVRO-1823: Java: Do not swallow IOException while reading magic bytes.
     (Koji Noguchi via blue)
 
+    AVRO-1825: Allow running build.sh dist under git (nielsbasjes)
+
   BUG FIXES
 
     AVRO-1493. Java: Avoid the "Turkish Locale Problem". Schema fingerprints are

http://git-wip-us.apache.org/repos/asf/avro/blob/49969908/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
index 1758b84..37b3017 100755
--- a/build.sh
+++ b/build.sh
@@ -87,7 +87,17 @@ case "$target" in
         DOC_DIR=avro-doc-$VERSION
 
 	rm -rf build/${SRC_DIR}
-	svn export --force . build/${SRC_DIR}
+	if [ -d .svn ];
+	then
+		svn export --force . build/${SRC_DIR}
+	elif [ -d .git ];
+	then
+		mkdir -p build/${SRC_DIR}
+		git archive HEAD | tar -x -C build/${SRC_DIR}
+	else
+		echo "Not SVN and not GIT .. cannot continue"
+		exit -1;
+	fi
 
 	#runs RAT on artifacts
         mvn -N -P rat antrun:run


Mime
View raw message