You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2017/12/12 23:43:06 UTC

thrift git commit: THRIFT-4416: additional CPAN packaging changes Client: perl

Repository: thrift
Updated Branches:
  refs/heads/master 8101f00b0 -> cea50758b


THRIFT-4416: additional CPAN packaging changes
Client: perl


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

Branch: refs/heads/master
Commit: cea50758b9e5165b14508c3ded3834480e97f2b8
Parents: 8101f00
Author: James E. King III <jk...@apache.org>
Authored: Tue Dec 12 18:41:40 2017 -0500
Committer: James E. King, III <jk...@apache.org>
Committed: Tue Dec 12 18:42:45 2017 -0500

----------------------------------------------------------------------
 lib/perl/build-cpan-dist.sh | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/cea50758/lib/perl/build-cpan-dist.sh
----------------------------------------------------------------------
diff --git a/lib/perl/build-cpan-dist.sh b/lib/perl/build-cpan-dist.sh
index 3b80734..7c7935f 100755
--- a/lib/perl/build-cpan-dist.sh
+++ b/lib/perl/build-cpan-dist.sh
@@ -7,7 +7,7 @@
 
 set -e
 
-rm MANIFEST
+rm -f MANIFEST
 rm -rf Thrift-*
 
 # setup cpan without a prompt
@@ -18,7 +18,6 @@ cpan install CPAN::Meta ExtUtils::MakeMaker JSON::PP
 
 perl Makefile.PL
 rm MYMETA.yml
-make
 make manifest
 make dist
 
@@ -31,9 +30,21 @@ echo '-----------------------------------------------------------'
 set -x
 
 DISTFILE=$(ls Thrift*.gz)
-tar xzf Thrift-*.gz
-rm Thrift-*.gz
+NEWFILE=${DISTFILE/t-v/t-}
+if [[ "$DISTFILE" != "$NEWFILE" ]]; then
+    mv $DISTFILE $NEWFILE
+    DISTFILE="$NEWFILE"
+fi
+tar xzf $DISTFILE
+rm $DISTFILE
 DISTDIR=$(ls -d Thrift*)
+# cpan doesn't like "Thrift-v0.11.0 as a directory name
+# needs to be Thrift-0.11.0
+NEWDIR=${DISTDIR/t-v/t-}
+if [[ "$DISTDIR" != "$NEWDIR" ]]; then
+    mv $DISTDIR $NEWDIR
+    DISTDIR="$NEWDIR"
+fi
 cd $DISTDIR
 perl ../tools/FixupDist.pl
 cd ..