flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject git commit: [Tools] Minor fixes in release script
Date Thu, 11 Sep 2014 17:46:43 GMT
Repository: incubator-flink
Updated Branches:
  refs/heads/master f8b6b79fe -> df477e61a


[Tools] Minor fixes in release script

- Introduced required RELEASE_BRANCH environment variable
- Some hardcoded binary calls (gpg, sha512sum, md5sum) have been
  replaced by environment variables (GPG, SHASUM, MD5SUM) and added
  "" argument for 'sed -i' calls for compatability with OS X
- Removed unused environment variables
- Directly call ssh/scp instead of going through sshpass


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

Branch: refs/heads/master
Commit: df477e61ab93ca0c2f620e8118dc6c72596fb3f2
Parents: f8b6b79
Author: uce <u.celebi@fu-berlin.de>
Authored: Thu Sep 11 15:00:37 2014 +0200
Committer: Ufuk Celebi <u.celebi@fu-berlin.de>
Committed: Thu Sep 11 19:38:06 2014 +0200

----------------------------------------------------------------------
 tools/create_release_files.sh | 43 +++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/df477e61/tools/create_release_files.sh
----------------------------------------------------------------------
diff --git a/tools/create_release_files.sh b/tools/create_release_files.sh
index 3693cfa..942549a 100755
--- a/tools/create_release_files.sh
+++ b/tools/create_release_files.sh
@@ -34,17 +34,18 @@ if [[ `basename $CURR_DIR` != "tools" ]] ; then
   exit 1
 fi
 
-GIT_USERNAME=${GIT_USERNAME:-pwendell}
-GIT_PASSWORD=${GIT_PASSWORD:-XXX}
 GPG_PASSPHRASE=${GPG_PASSPHRASE:-XXX}
 GPG_KEY=${GPG_KEY:-XXX}
 GIT_BRANCH=${GIT_BRANCH:-branch-1.0}
 OLD_VERSION=${OLD_VERSION:-0.6-incubating-SNAPSHOT}
 RELEASE_VERSION=${NEW_VERSION}
-RELEASE_CANDIDATE=${RELEASE_CANDIDATE:-rc4}
-NEW_VERSION_HADOOP2=${NEW_VERSION_HADOOP2:-"$RELEASE_VERSION-hadoop2"} # this is wrong! 
+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
 USER_NAME=${USER_NAME:-pwendell}
 MVN=${MVN:-mvn}
+GPG=${GPG:-gpg}
+SHASUM=${SHASUM:-sha512sum}
+MD5SUM=${MD5SUM:-$MD5SUM}
 sonatype_user=${sonatype_user:-rmetzger}
 sonatype_pw=${sonatype_pw:-XXX}
 
@@ -56,7 +57,7 @@ sleep 5
 
 git clone https://github.com/apache/incubator-flink.git flink
 cd flink
-git checkout -b release-0.6 origin/release-0.6
+git checkout -b $RELEASE_BRANCH origin/$RELEASE_BRANCH
 rm .gitignore
 rm .travis.yml
 rm deploysettings.xml
@@ -64,7 +65,7 @@ rm CHANGELOG
 #rm -rf .git
 
 #find . -name 'pom.xml' -type f -exec sed -i 's#<version>$OLD_VERSION</version>#<version>$NEW_VERSION</version>#'
{} \;
-find . -name 'pom.xml' -type f -exec sed -i 's#<version>'$OLD_VERSION'</version>#<version>'$NEW_VERSION'</version>#'
{} \;
+find . -name 'pom.xml' -type f -exec sed -i "" 's#<version>'$OLD_VERSION'</version>#<version>'$NEW_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
@@ -77,17 +78,17 @@ cd ..
 echo "Creating source package"
 cp -r flink flink-$RELEASE_VERSION
 tar cvzf flink-${RELEASE_VERSION}-src.tgz --exclude .git flink-$RELEASE_VERSION
-echo $GPG_PASSPHRASE | gpg --batch --default-key $GPG_KEY --passphrase-fd 0 --armour --output
flink-$RELEASE_VERSION-src.tgz.asc \
+echo $GPG_PASSPHRASE | $GPG --batch --default-key $GPG_KEY --passphrase-fd 0 --armour --output
flink-$RELEASE_VERSION-src.tgz.asc \
   --detach-sig flink-$RELEASE_VERSION-src.tgz
-md5sum flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.md5
-sha512sum flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.sha
+$MD5SUM flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.md5
+$SHASUM flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.sha
 rm -rf flink-$RELEASE_VERSION
 
 
 make_binary_release() {
-  echo "Creating binary release name: $NAME, flags: $FLAGS"
   NAME=$1
   FLAGS=$2
+  echo "Creating binary release name: $NAME, flags: $FLAGS"
   cp -r flink flink-$RELEASE_VERSION-bin-$NAME
   
   cd flink-$RELEASE_VERSION-bin-$NAME
@@ -103,25 +104,25 @@ make_binary_release() {
   rm -rf flink-$RELEASE_VERSION
 
   # Sign md5 and sha the tgz
-  echo $GPG_PASSPHRASE | gpg --batch --default-key $GPG_KEY \
+  echo $GPG_PASSPHRASE | $GPG --batch --default-key $GPG_KEY \
     --passphrase-fd 0 --armour \
     --output flink-$RELEASE_VERSION-bin-$NAME.tgz.asc \
     --detach-sig flink-$RELEASE_VERSION-bin-$NAME.tgz
-  md5sum flink-$RELEASE_VERSION-bin-$NAME.tgz > flink-$RELEASE_VERSION-bin-$NAME.tgz.md5
-  sha512sum flink-$RELEASE_VERSION-bin-$NAME.tgz > flink-$RELEASE_VERSION-bin-$NAME.tgz.sha
+  $MD5SUM flink-$RELEASE_VERSION-bin-$NAME.tgz > flink-$RELEASE_VERSION-bin-$NAME.tgz.md5
+  $SHASUM flink-$RELEASE_VERSION-bin-$NAME.tgz > flink-$RELEASE_VERSION-bin-$NAME.tgz.sha
 
   if [ -f "flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz" ] ; then
-    echo $GPG_PASSPHRASE | gpg --batch --default-key $GPG_KEY \
+    echo $GPG_PASSPHRASE | $GPG --batch --default-key $GPG_KEY \
     --passphrase-fd 0 --armour \
     --output flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz.asc \
     --detach-sig flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz
-    md5sum flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz > flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz.md5
-    sha512sum flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz > flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz.sha
+    $MD5SUM flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz > flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz.md5
+    $SHASUM flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz > flink-$RELEASE_VERSION-bin-$NAME-yarn.tgz.sha
   fi
 }
 
 make_binary_release "hadoop1" ""
-make_binary_release "hadoop200alpha" "-P\!include-yarn -Dhadoop.profile=2 -Dhadoop.version=2.0.0-alpha"
+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 "mapr4" "-Dhadoop.profile=2 -Pvendor-repos -Dhadoop.version=2.3.0-mapr-4.0.0-FCS"
 
@@ -129,8 +130,8 @@ make_binary_release "hadoop2" "-Dhadoop.profile=2"
 # Copy data
 echo "Copying release tarballs"
 folder=flink-$RELEASE_VERSION-$RELEASE_CANDIDATE
-sshpass -p "$sonatype_pw" ssh $USER_NAME@people.apache.org mkdir /home/$USER_NAME/public_html/$folder
-sshpass -p "$sonatype_pw" scp flink-* $USER_NAME@people.apache.org:/home/$USER_NAME/public_html/$folder/
+ssh $USER_NAME@people.apache.org mkdir /home/$USER_NAME/public_html/$folder
+scp flink-* $USER_NAME@people.apache.org:/home/$USER_NAME/public_html/$folder/
 echo "copy done"
 
 echo "Deploying to repository.apache.org"
@@ -138,9 +139,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"
-$MVN clean deploy -Prelease,docs-and-source --settings deploysettings.xml -DskipTests -Dgpg.keyname=$GPG_KEY
-Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10
+$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
 sleep 4
-$MVN clean deploy -Prelease,docs-and-source --settings deploysettings.xml -DskipTests -Dgpg.keyname=$GPG_KEY
-Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10
+$MVN clean deploy -Dgpg.executable=$GPG -Prelease,docs-and-source --settings deploysettings.xml
-DskipTests -Dgpg.keyname=$GPG_KEY -Dgpg.passphrase=$GPG_PASSPHRASE -DretryFailedDeploymentCount=10
 
 echo "Done. Don't forget to commit the release version"


Mime
View raw message