You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ma...@apache.org on 2016/01/06 00:23:16 UTC

reef git commit: [REEF-989] Update release scripts and release manager guide

Repository: reef
Updated Branches:
  refs/heads/master 030772b00 -> 928a043fb


[REEF-989] Update release scripts and release manager guide

This change:
  * Removes legacy incubating-related code in change_version.py and release.py.
  * Removes unused `import` in release.py.
  * Fixes a few spacing issues.

JIRA:
  [REEF-989](https://issues.apache.org/jira/browse/REEF-989)

Pull Request:
  This closes #757


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

Branch: refs/heads/master
Commit: 928a043fba912343a16a251938aca5b7ebf72181
Parents: 030772b
Author: Dongjoon Hyun <do...@apache.org>
Authored: Tue Jan 5 12:29:10 2016 -0800
Committer: Mariia Mykhailova <ma...@apache.org>
Committed: Tue Jan 5 15:17:13 2016 -0800

----------------------------------------------------------------------
 dev/change_version.py | 21 ++++++++-------------
 dev/release.py        | 14 ++++++--------
 2 files changed, 14 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/928a043f/dev/change_version.py
----------------------------------------------------------------------
diff --git a/dev/change_version.py b/dev/change_version.py
index 7ffb5ed..fc84cae 100644
--- a/dev/change_version.py
+++ b/dev/change_version.py
@@ -23,7 +23,6 @@ python change_version <reef_home> <reef_version_for_pom.xml> -s <true or false>
 
 -s option changes value of 'IsSnapshot' in lang/cs/build.props.
 If you use the option "-s false", bulid.props changes as,
- <RemoveIncubating>true</RemoveIncubating>
  <IsSnapshot>false</IsSnapshot>
  <SnapshotNumber>00</SnapshotNumber>
 
@@ -34,9 +33,9 @@ If you use "-p", then only the "pom.xml" files are changed.
 You can also see how to run the script with "python change_version.py -h"
 
 (Example)
-python change_version ~/incubator_reef 0.12.0-incubating -s true
-python change_version ~/incubator_reef 0.12.0-incubating -s false
-python change_version ~/incubator_reef 0.12.0-incubating -p -s true
+python change_version ~/reef 0.14.0 -s true
+python change_version ~/reef 0.14.0 -s false
+python change_version ~/reef 0.14.0 -p -s true
 """
 
 
@@ -167,22 +166,18 @@ def change_build_props(file, is_snapshot):
     changed_str = ""
 
     f = open(file, 'r')
-    r1 = re.compile('<RemoveIncubating>(.*?)</RemoveIncubating>')
-    r2 = re.compile('<IsSnapshot>(.*?)</IsSnapshot>')
-    r3 = re.compile('<SnapshotNumber>(.*?)</SnapshotNumber>')
+    r1 = re.compile('<IsSnapshot>(.*?)</IsSnapshot>')
+    r2 = re.compile('<SnapshotNumber>(.*?)</SnapshotNumber>')
 
     while True:
         line = f.readline()
         if not line:
             break
-        if "<RemoveIncubating>" and "</RemoveIncubating>" in line and is_snapshot=="false":
-            old_remove_incubating = r1.search(line).group(1)
-            changed_str += line.replace(old_remove_incubating, "true")
-        elif "<IsSnapshot>" in line and "</IsSnapshot>" in line:
-            old_is_snapshot = r2.search(line).group(1)
+        if "<IsSnapshot>" in line and "</IsSnapshot>" in line:
+            old_is_snapshot = r1.search(line).group(1)
             changed_str += line.replace(old_is_snapshot, is_snapshot)
         elif "<SnapshotNumber>" in line and "</SnapshotNumber>" in line and is_snapshot=="false":
-            old_snapshot_number = r3.search(line).group(1)
+            old_snapshot_number = r2.search(line).group(1)
             changed_str += line.replace(old_snapshot_number, "00")
         else:
             changed_str += line

http://git-wip-us.apache.org/repos/asf/reef/blob/928a043f/dev/release.py
----------------------------------------------------------------------
diff --git a/dev/release.py b/dev/release.py
index d0dbf69..f336b1a 100644
--- a/dev/release.py
+++ b/dev/release.py
@@ -25,7 +25,7 @@ python release.py <reef_home> <reef_version> <rc candidate number> <public key i
 You can also see how to run the script with 'python release.py -h'
 
 (Examples)
-python release.py ~/incubator-reef 0.12.0-incubating 1 E488F925
+python release.py ~/reef 0.14.0 1 E488F925
 
 """
 
@@ -34,7 +34,6 @@ import subprocess
 import fnmatch
 import tarfile
 import hashlib
-import sys
 import os
 import argparse
 
@@ -52,7 +51,7 @@ def get_ignore_list(reef_home):
         line = f.readline()[:-1]
         if not line:
             break
-        if not "#" in line:
+        if "#" not in line:
             ignore_list.insert(0, "*/" + line)
 
     return ignore_list
@@ -79,7 +78,7 @@ def get_mail_text(reef_version, rc_num):
     return_str += "SHA: " + sha + "\n"
 
     return_str += "\nRelease artifacts are signed with a key found in the KEYS file available here:\n"
-    return_str += "\nhttps://dist.apache.org/repos/dist/release/incubator/reef/KEYS\n\n\n\n"
+    return_str += "\nhttps://dist.apache.org/repos/dist/release/reef/KEYS\n\n\n\n"
 
     return_str += "<Issue Things>\n\n\n\n"
 
@@ -127,15 +126,15 @@ if __name__ == "__main__":
 
         # Make tar.gz
         tar = tarfile.open(file_name, "w:gz")
-        tar.add(reef_home, arcname="apache-reef-"+reef_version , exclude=exclude_git_ignore)
+        tar.add(reef_home, arcname="apache-reef-"+reef_version, exclude=exclude_git_ignore)
         tar.close()
 
         gpg_str = "gpg --armor -u " + str(key_id) + " --output " + file_name + ".asc " + "--detach-sig " + file_name
         gpg_result = subprocess.call(gpg_str, shell=True)
 
         if gpg_result == 0:
-            md5 = hashlib.md5(open(file_name,'rb').read()).hexdigest()
-            sha = hashlib.sha512(open(file_name,'rb').read()).hexdigest()
+            md5 = hashlib.md5(open(file_name, 'rb').read()).hexdigest()
+            sha = hashlib.sha512(open(file_name, 'rb').read()).hexdigest()
 
             md5_file = open(file_name + ".md5", "w")
             md5_file.write(md5 + " *" + file_name + "\n")
@@ -149,7 +148,6 @@ if __name__ == "__main__":
             print get_mail_text(reef_version, rc_num)
             print "===========================================================================\n"
 
-
         else:
             print "gpg error"