Skip to content

Commit 0f6c111

Browse files
committed
build: a few more cheats
1 parent 525ddd6 commit 0f6c111

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

igor.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,9 @@ def do_cheats():
408408
print()
409409
print(f"Coverage version is {facts.ver}")
410410

411+
repo = "nedbat/coveragepy"
412+
github = f"https://github.com/{repo}"
411413
egg = "egg=coverage==0.0" # to force a re-install
412-
if facts.branch == "master":
413-
print(f"pip install git+https://github.com/nedbat/coveragepy#{egg}")
414-
else:
415-
print(f"pip install git+https://github.com/nedbat/coveragepy@{facts.branch}#{egg}")
416-
print(f"pip install git+https://github.com/nedbat/coveragepy@{facts.sha}#{egg}")
417414
print(f"https://coverage.readthedocs.io/en/{facts.ver}/changes.html#changes-{facts.anchor}")
418415

419416
print(
@@ -422,6 +419,20 @@ def do_cheats():
422419
f"[coverage {facts.ver}](https://pypi.org/project/coverage/{facts.ver})."
423420
)
424421

422+
print("\n## To run this code:")
423+
if facts.branch == "master":
424+
print(f"pip install git+{github}#{egg}")
425+
else:
426+
print(f"pip install git+{github}@{facts.branch}#{egg}")
427+
print(f"pip install git+{github}@{facts.sha}#{egg}")
428+
429+
print(
430+
"\n## For other collaborators:\n" +
431+
f"git clone {github}\n" +
432+
f"cd {repo.partition('/')[-1]}\n" +
433+
f"git checkout {facts.sha}"
434+
)
435+
425436

426437
def do_help():
427438
"""List the available commands"""

0 commit comments

Comments
 (0)