mirror of https://github.com/apache/lucene.git
LUCENE-8802: buildAndPushRelease --logfile arg (#679)
(cherry picked from commit df1775ffd3
)
This commit is contained in:
parent
8a488478f0
commit
5ee558cc5d
|
@ -17,10 +17,10 @@ import argparse
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import shutil
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from subprocess import TimeoutExpired
|
||||||
import textwrap
|
import textwrap
|
||||||
import urllib.request, urllib.error, urllib.parse
|
import urllib.request, urllib.error, urllib.parse
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
@ -252,6 +252,8 @@ def parse_config():
|
||||||
help='Release Candidate number. Default: 1')
|
help='Release Candidate number. Default: 1')
|
||||||
parser.add_argument('--root', metavar='PATH', default='.',
|
parser.add_argument('--root', metavar='PATH', default='.',
|
||||||
help='Root of Git working tree for lucene-solr. Default: "." (the current directory)')
|
help='Root of Git working tree for lucene-solr. Default: "." (the current directory)')
|
||||||
|
parser.add_argument('--logfile', metavar='PATH',
|
||||||
|
help='Specify log file path (default /tmp/release.log)')
|
||||||
config = parser.parse_args()
|
config = parser.parse_args()
|
||||||
|
|
||||||
if not config.prepare and config.sign:
|
if not config.prepare and config.sign:
|
||||||
|
@ -270,6 +272,9 @@ def parse_config():
|
||||||
if os.system('git rev-parse') or 3 != len([d for d in ('dev-tools','lucene','solr') if os.path.isdir(d)]):
|
if os.system('git rev-parse') or 3 != len([d for d in ('dev-tools','lucene','solr') if os.path.isdir(d)]):
|
||||||
parser.error('Root path "%s" is not a valid lucene-solr checkout' % config.root)
|
parser.error('Root path "%s" is not a valid lucene-solr checkout' % config.root)
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
global LOG
|
||||||
|
if config.logfile:
|
||||||
|
LOG = config.logfile
|
||||||
|
|
||||||
config.version = read_version(config.root)
|
config.version = read_version(config.root)
|
||||||
print('Building version: %s' % config.version)
|
print('Building version: %s' % config.version)
|
||||||
|
|
Loading…
Reference in New Issue