LUCENE-8802: buildAndPushRelease --logfile arg (#679)

This commit is contained in:
Jan Høydahl 2019-06-06 21:47:50 +02:00 committed by GitHub
parent 8d6fd7298f
commit df1775ffd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -17,10 +17,10 @@ import argparse
import datetime
import re
import time
import shutil
import os
import sys
import subprocess
from subprocess import TimeoutExpired
import textwrap
import urllib.request, urllib.error, urllib.parse
import xml.etree.ElementTree as ET
@ -252,6 +252,8 @@ def parse_config():
help='Release Candidate number. Default: 1')
parser.add_argument('--root', metavar='PATH', default='.',
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()
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)]):
parser.error('Root path "%s" is not a valid lucene-solr checkout' % config.root)
os.chdir(cwd)
global LOG
if config.logfile:
LOG = config.logfile
config.version = read_version(config.root)
print('Building version: %s' % config.version)