beep boop
This commit is contained in:
parent
43f8ef542f
commit
b1b28a7929
|
@ -19,6 +19,14 @@ TOPFILE_TYPES = ["doc", "bugfix", "misc", "feature", "removal"]
|
|||
def check(location):
|
||||
|
||||
location = os.path.abspath(location)
|
||||
|
||||
branch = runCommand([b"git", b"rev-parse", b"--abbrev-ref", "HEAD"],
|
||||
cwd=location).strip()
|
||||
|
||||
if branch == "trunk":
|
||||
print("On trunk, no need to look at this.")
|
||||
sys.exit(0)
|
||||
|
||||
r = runCommand([b"git", b"diff", b"--name-only", b"origin/trunk..."],
|
||||
cwd=location)
|
||||
files = r.strip().split(os.linesep)
|
||||
|
@ -28,6 +36,11 @@ def check(location):
|
|||
print(change)
|
||||
print("----")
|
||||
|
||||
if len(files) == 1:
|
||||
if files[0] == os.sep.join(["docs", "fun", "Twisted.Quotes"]):
|
||||
print("Quotes change only; no topfile needed.")
|
||||
sys.exit(0)
|
||||
|
||||
for change in files:
|
||||
if os.sep + "topfiles" + os.sep in change:
|
||||
if change.rsplit(".", 1)[1] in TOPFILE_TYPES:
|
||||
|
|
7
tox.ini
7
tox.ini
|
@ -6,7 +6,7 @@ toxworkdir=build/
|
|||
envlist=
|
||||
{py27,py33,py34,py35}-{tests,nomodules,coverage}-posix
|
||||
py27-{tests,nomodules,coverage}-windows,
|
||||
pyflakes,twistedchecker,apidocs,narrativedocs
|
||||
pyflakes,twistedchecker,apidocs,narrativedocs,topfile
|
||||
|
||||
[testenv]
|
||||
changedir={envtmpdir}
|
||||
|
@ -54,6 +54,8 @@ commands =
|
|||
coverage: python {toxinidir}/admin/_copy.py "_trial_temp/.coverage*" {toxinidir}
|
||||
coverage: python {toxinidir}/admin/_copy.py ".coverage*" {toxinidir}
|
||||
|
||||
topfile: python {toxinidir}/admin/check_topfile.py "{toxinidir}"
|
||||
|
||||
[testenv:twistedchecker]
|
||||
basepython=python2.7
|
||||
changedir={toxinidir}
|
||||
|
@ -62,3 +64,6 @@ basepython=python2.7
|
|||
changedir={toxinidir}
|
||||
[testenv:apidocs]
|
||||
basepython=python2.7
|
||||
[testenv:topfile]
|
||||
basepython=python2.7
|
||||
changedir={toxinidir}
|
||||
|
|
Loading…
Reference in New Issue