flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [13/17] flink git commit: [build tools] Release script update
Date Sun, 18 Jan 2015 19:03:19 GMT
[build tools] Release script update

Default hadoop version is now hadoop2
Generate specific pom avoids version collisions with dependencies
Updated poms for new release scripts

Conflicts:
	flink-addons/flink-avro/pom.xml
	flink-addons/flink-hadoop-compatibility/pom.xml
	flink-addons/flink-hbase/pom.xml
	flink-addons/flink-jdbc/pom.xml
	flink-addons/flink-spargel/pom.xml
	flink-addons/flink-tachyon/pom.xml
	flink-quickstart/flink-quickstart-java/pom.xml
	flink-quickstart/flink-quickstart-scala/pom.xml


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

Branch: refs/heads/master
Commit: d14f3834373345fd058dee800cff7665d956d25e
Parents: 3836c96
Author: mbalassi <mbalassi@apache.org>
Authored: Thu Dec 18 19:00:33 2014 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Sun Jan 18 09:58:20 2015 -0800

----------------------------------------------------------------------
 flink-addons/flink-avro/pom.xml                 |  2 +-
 flink-addons/flink-hadoop-compatibility/pom.xml |  2 +-
 flink-addons/flink-hbase/pom.xml                |  2 +-
 flink-addons/flink-jdbc/pom.xml                 |  2 +-
 flink-addons/flink-spargel/pom.xml              |  2 +-
 flink-addons/flink-tachyon/pom.xml              |  2 +-
 flink-quickstart/flink-quickstart-java/pom.xml  | 28 ++++++++++----------
 flink-quickstart/flink-quickstart-scala/pom.xml | 26 +++++++++---------
 tools/create_release_files.sh                   | 22 +++++++--------
 tools/generate_specific_pom.sh                  | 20 ++++++++++----
 10 files changed, 59 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-avro/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-avro/pom.xml b/flink-addons/flink-avro/pom.xml
index 5feb966..8115f9d 100644
--- a/flink-addons/flink-avro/pom.xml
+++ b/flink-addons/flink-avro/pom.xml
@@ -24,8 +24,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 	
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-hadoop-compatibility/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-hadoop-compatibility/pom.xml b/flink-addons/flink-hadoop-compatibility/pom.xml
index 1587fcc..59f541c 100644
--- a/flink-addons/flink-hadoop-compatibility/pom.xml
+++ b/flink-addons/flink-hadoop-compatibility/pom.xml
@@ -23,8 +23,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 	
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-hbase/pom.xml b/flink-addons/flink-hbase/pom.xml
index c1d55a6..6807b0c 100644
--- a/flink-addons/flink-hbase/pom.xml
+++ b/flink-addons/flink-hbase/pom.xml
@@ -23,8 +23,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-jdbc/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-jdbc/pom.xml b/flink-addons/flink-jdbc/pom.xml
index 2939b20..ec172a9 100644
--- a/flink-addons/flink-jdbc/pom.xml
+++ b/flink-addons/flink-jdbc/pom.xml
@@ -24,8 +24,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 	
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-spargel/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-spargel/pom.xml b/flink-addons/flink-spargel/pom.xml
index 4aa48a6..863e66e 100644
--- a/flink-addons/flink-spargel/pom.xml
+++ b/flink-addons/flink-spargel/pom.xml
@@ -23,8 +23,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-addons/flink-tachyon/pom.xml
----------------------------------------------------------------------
diff --git a/flink-addons/flink-tachyon/pom.xml b/flink-addons/flink-tachyon/pom.xml
index 887fa4b..82eaa1d 100644
--- a/flink-addons/flink-tachyon/pom.xml
+++ b/flink-addons/flink-tachyon/pom.xml
@@ -21,8 +21,8 @@ under the License.
 	<modelVersion>4.0.0</modelVersion>
 
 	<parent>
-		<artifactId>flink-addons</artifactId>
 		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-addons</artifactId>
 		<version>0.9-SNAPSHOT</version>
 		<relativePath>..</relativePath>
 	</parent>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-quickstart/flink-quickstart-java/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/pom.xml b/flink-quickstart/flink-quickstart-java/pom.xml
index 452a352..df87f34 100644
--- a/flink-quickstart/flink-quickstart-java/pom.xml
+++ b/flink-quickstart/flink-quickstart-java/pom.xml
@@ -17,21 +17,21 @@ specific language governing permissions and limitations
 under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
   
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
 
-  <parent>
-    <groupId>org.apache.flink</groupId>
-    <artifactId>flink-quickstart</artifactId>
-    <version>0.9-SNAPSHOT</version>
-    <relativePath>..</relativePath>
-  </parent>
+	<parent>
+		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-quickstart</artifactId>
+		<version>0.9-SNAPSHOT</version>
+		<relativePath>..</relativePath>
+	</parent>
 
-  <artifactId>flink-quickstart-java</artifactId>
-  <packaging>maven-archetype</packaging>
+	<artifactId>flink-quickstart-java</artifactId>
+	<packaging>maven-archetype</packaging>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/flink-quickstart/flink-quickstart-scala/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/pom.xml b/flink-quickstart/flink-quickstart-scala/pom.xml
index b84c517..b4dd1b0 100644
--- a/flink-quickstart/flink-quickstart-scala/pom.xml
+++ b/flink-quickstart/flink-quickstart-scala/pom.xml
@@ -17,21 +17,21 @@ specific language governing permissions and limitations
 under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
   
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-  </properties>
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+	</properties>
 
-  <parent>
-    <groupId>org.apache.flink</groupId>
-    <artifactId>flink-quickstart</artifactId>
-    <version>0.9-SNAPSHOT</version>
-    <relativePath>..</relativePath>
-  </parent>
+	<parent>
+		<groupId>org.apache.flink</groupId>
+		<artifactId>flink-quickstart</artifactId>
+		<version>0.9-SNAPSHOT</version>
+		<relativePath>..</relativePath>
+	</parent>
 
-  <artifactId>flink-quickstart-scala</artifactId>
-  <packaging>maven-archetype</packaging>
+	<artifactId>flink-quickstart-scala</artifactId>
+	<packaging>maven-archetype</packaging>
 
 </project>

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/tools/create_release_files.sh
----------------------------------------------------------------------
diff --git a/tools/create_release_files.sh b/tools/create_release_files.sh
index 8e6d1ad..7f6461e 100755
--- a/tools/create_release_files.sh
+++ b/tools/create_release_files.sh
@@ -40,22 +40,22 @@ GIT_BRANCH=${GIT_BRANCH:-branch-1.0}
 OLD_VERSION=${OLD_VERSION:-0.6-incubating-SNAPSHOT}
 RELEASE_VERSION=${NEW_VERSION}
 RELEASE_CANDIDATE=${RELEASE_CANDIDATE:-rc1}
-NEW_VERSION_HADOOP2=${NEW_VERSION_HADOOP2:-"$RELEASE_VERSION-hadoop2"} # this is wrong, i.e.
we need 0.7-hadoop2-incubating
+NEW_VERSION_HADOOP1=${NEW_VERSION_HADOOP1:-"$RELEASE_VERSION-hadoop1"}
 USER_NAME=${USER_NAME:-pwendell}
 MVN=${MVN:-mvn}
 GPG=${GPG:-gpg}
 SHASUM=${SHASUM:-sha512sum}
 MD5SUM=${MD5SUM:-md5sum}
-sonatype_user=${sonatype_user:-rmetzger}
+sonatype_user=${sonatype_user:-rmetzger} #legacy variable name referring to maven
 sonatype_pw=${sonatype_pw:-XXX}
 
-#echo $NEW_VERSION_HADOOP2
+#echo $NEW_VERSION_HADOOP1
 #sleep 5
 #set -e
 
 # create source package
 
-git clone https://github.com/apache/incubator-flink.git flink
+git clone https://github.com/apache/flink.git flink
 cd flink
 git checkout -b "$RELEASE_BRANCH-$RELEASE_CANDIDATE" origin/$RELEASE_BRANCH
 rm .gitignore
@@ -70,7 +70,7 @@ find . -name 'pom.xml' -type f -exec sed -i 's#<version>'$OLD_VERSION'</version>
 
 git commit --author="Robert Metzger <rmetzger@apache.org>" -am "Commit for release
$RELEASE_VERSION"
 # sry for hardcoding my name, but this makes releasing even faster
-git remote add asf_push https://rmetzger@git-wip-us.apache.org/repos/asf/incubator-flink.git
+git remote add asf_push https://$USER_NAME@git-wip-us.apache.org/repos/asf/flink.git
 RELEASE_HASH=`git rev-parse HEAD`
 echo "Echo created release hash $RELEASE_HASH"
 
@@ -123,16 +123,16 @@ make_binary_release() {
   fi
 }
 
-make_binary_release "hadoop1" ""
-make_binary_release "hadoop200alpha" "-P!include-yarn -Dhadoop.profile=2 -Dhadoop.version=2.0.0-alpha"
-make_binary_release "hadoop2" "-Dhadoop.profile=2"
+make_binary_release "hadoop1" "-Dhadoop.profile=1"
+make_binary_release "hadoop200alpha" "-P!include-yarn -Dhadoop.version=2.0.0-alpha"
+make_binary_release "hadoop2" ""
 # make_binary_release "mapr4" "-Dhadoop.profile=2 -Pvendor-repos -Dhadoop.version=2.3.0-mapr-4.0.0-FCS"
 
 
 # Copy data
 echo "Copying release tarballs"
 folder=flink-$RELEASE_VERSION-$RELEASE_CANDIDATE
-ssh $USER_NAME@people.apache.org mkdir /home/$USER_NAME/public_html/$folder
+ssh $USER_NAME@people.apache.org mkdir -p /home/$USER_NAME/public_html/$folder
 scp flink-* $USER_NAME@people.apache.org:/home/$USER_NAME/public_html/$folder/
 echo "copy done"
 
@@ -140,9 +140,9 @@ echo "Deploying to repository.apache.org"
 
 cd flink
 cp ../../deploysettings.xml . 
-echo "For your reference, the command:\n\t $MVN clean deploy -Prelease --settings deploysettings.xml
-DskipTests -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE ./tools/generate_specific_pom.sh
$NEW_VERSION $NEW_VERSION_HADOOP2 pom.xml"
+echo "For your reference, the command:\n\t $MVN clean deploy -Prelease --settings deploysettings.xml
-DskipTests -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE ./tools/generate_specific_pom.sh
$NEW_VERSION $NEW_VERSION_HADOOP1 pom.xml"
 $MVN clean deploy -Prelease,docs-and-source --settings deploysettings.xml -DskipTests -Dgpg.executable=$GPG
-Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10
-./tools/generate_specific_pom.sh $NEW_VERSION $NEW_VERSION_HADOOP2 pom.xml
+./tools/generate_specific_pom.sh $NEW_VERSION $NEW_VERSION_HADOOP1 pom.xml
 sleep 4
 $MVN clean deploy -Dgpg.executable=$GPG -Prelease,docs-and-source --settings deploysettings.xml
-DskipTests -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10
 

http://git-wip-us.apache.org/repos/asf/flink/blob/d14f3834/tools/generate_specific_pom.sh
----------------------------------------------------------------------
diff --git a/tools/generate_specific_pom.sh b/tools/generate_specific_pom.sh
index e180ff8..7c84a42 100755
--- a/tools/generate_specific_pom.sh
+++ b/tools/generate_specific_pom.sh
@@ -81,7 +81,8 @@ echo "Using $nupom as name for the generated pom file."
 poms=`find $flink_home -name pom.xml`
 for p in $poms; do
   # write into tmp file because in-place replacement is not possible (if nupom="pom.xml")
-  tmp_nuname="`dirname $p`/__generate_specific_pom_tmp"
+  tmp_nuname1="`dirname $p`/__generate_specific_pom_tmp1"
+  tmp_nuname2="`dirname $p`/__generate_specific_pom_tmp2"
   nuname="`dirname $p`/${nupom}"
   # Now we do search and replace of explicit strings.  The best way of
   # seeing what the below does is by doing a diff between the original
@@ -92,12 +93,21 @@ for p in $poms; do
   # enable/disable hadoop 1 and hadoop 2 profiles as appropriate
   # removing a comment string too. We output the new pom beside the
   # original.
-  sed -e "s/${old_version}/${new_version}/" \
-    -e "s/\(<module>[^<]*\)/\1\/${nupom}/" \
+
+  # To avoid accidentally replace version numbers in our dependencies 
+  # sharing the version number with the current release use the following.
+
+  perl -0777 -pe "s:<groupId>org.apache.flink</groupId>\n(\t*<artifactId>([a-z]+-)+[a-z]+</artifactId>\n\t*)<version>${old_version}</version>:<groupId>org.apache.flink</groupId>\n\1<version>${new_version}</version>:"
$p > "$tmp_nuname1"
+
+  # Alternatively when no version collisions are present this is enough:
+  # sed -e "s/${old_version}/${new_version}/" $p > "$tmp_nuname1"
+
+  sed -e "s/\(<module>[^<]*\)/\1\/${nupom}/" \
     -e "s/\(relativePath>\.\.\)/\1\/${nupom}/" \
     -e "s/<!--hadoop1-->.*name>.*/${hadoop1}/" \
     -e "s/<!--hadoop2-->.*name>.*/${hadoop2}/" \
-  $p > "$tmp_nuname"
-  mv $tmp_nuname $nuname
+    $tmp_nuname1 > "$tmp_nuname2"
+  rm $tmp_nuname1
+  mv $tmp_nuname2 $nuname
 done
 


Mime
View raw message