43
43
The script takes over almost all
44
44
steps necessary for a release from a high level point of view it does the following things:
45
45
46
- - run prerequisite checks ie. check for Java 1.6 being present or S3 credentials available as env variables
46
+ - run prerequisite checks ie. check for S3 credentials available as env variables
47
47
- detect the version to release from the specified branch (--branch) or the current branch
48
48
- creates a release branch & updates pom.xml and README.md to point to a release version rather than a snapshot
49
49
- builds the artifacts
@@ -109,18 +109,6 @@ def java_exe():
109
109
path = JAVA_HOME
110
110
return 'export JAVA_HOME="%s" PATH="%s/bin:$PATH" JAVACMD="%s/bin/java"' % (path , path , path )
111
111
112
- def verify_java_version (version ):
113
- s = os .popen ('%s; java -version 2>&1' % java_exe ()).read ()
114
- if s .find (' version "%s.' % version ) == - 1 :
115
- raise RuntimeError ('got wrong version for java %s:\n %s' % (version , s ))
116
-
117
- # Verifies the java version. We guarantee that we run with Java 1.6
118
- # If 1.6 is not available fail the build!
119
- def verify_mvn_java_version (version , mvn ):
120
- s = os .popen ('%s; %s --version 2>&1' % (java_exe (), mvn )).read ()
121
- if s .find ('Java version: %s' % version ) == - 1 :
122
- raise RuntimeError ('got wrong java version for %s %s:\n %s' % (mvn , version , s ))
123
-
124
112
# Returns the hash of the current git HEAD revision
125
113
def get_head_hash ():
126
114
return os .popen (' git rev-parse --verify HEAD 2>&1' ).read ().strip ()
@@ -133,9 +121,6 @@ def get_tag_hash(tag):
133
121
def get_current_branch ():
134
122
return os .popen ('git rev-parse --abbrev-ref HEAD 2>&1' ).read ().strip ()
135
123
136
- verify_java_version ('1.6' ) # we require to build with 1.6
137
- verify_mvn_java_version ('1.6' , MVN )
138
-
139
124
# Utility that returns the name of the release branch for a given version
140
125
def release_branch (version ):
141
126
return 'release_branch_%s' % version
@@ -218,7 +203,7 @@ def callback(line):
218
203
# If we find pattern, we copy the line and replace its content
219
204
if line .find (pattern ) >= 0 :
220
205
return line .replace (pattern , replacement ).replace ('%s' % (datetime .datetime .now ().strftime ("%Y-%m-%d" )),
221
- 'XXXX-XX-XX' )+ line
206
+ 'XXXX-XX-XX' )+ line
222
207
else :
223
208
return line
224
209
process_file (readme_file , callback )
@@ -356,15 +341,15 @@ def format_issues_html(issues, title='Fix'):
356
341
if len (issues ) > 0 :
357
342
response += '<h2>%s</h2>\n <ul>\n ' % title
358
343
for issue in issues :
359
- response += '</ li>[<a href="%s">%s</a>] - %s\n ' % (issue .html_url , issue .number , issue .title )
344
+ response += '<li>[<a href="%s">%s</a>] - %s\n ' % (issue .html_url , issue .number , issue .title )
360
345
response += '</ul>\n '
361
346
362
347
return response
363
348
364
349
def get_github_repository (reponame ,
365
- login = env .get ('GITHUB_LOGIN' , None ),
366
- password = env .get ('GITHUB_PASSWORD' , None ),
367
- key = env .get ('GITHUB_KEY' , None )):
350
+ login = env .get ('GITHUB_LOGIN' , None ),
351
+ password = env .get ('GITHUB_PASSWORD' , None ),
352
+ key = env .get ('GITHUB_KEY' , None )):
368
353
if login :
369
354
g = github3 .login (login , password )
370
355
elif key :
0 commit comments