Skip to content

Commit 44bd3db

Browse files
committed
e Add meaningful error messages
1 parent 8c5657c commit 44bd3db

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

build/prepare_release.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,15 @@ def check_pre_conditions_for_publish(self):
3636
repo = Repo(self.details.main_project_dir)
3737
assert not repo.bare
3838

39-
# run(["git", "branch"])
4039
assert (repo.active_branch.name == 'master')
41-
# check_step("we are on the master branch")
4240

43-
# run(["git", "status"])
4441
# From https://stackoverflow.com/questions/31959425/how-to-get-staged-files-using-gitpython
45-
assert (len(repo.index.diff(None)) == 0) # Modified
46-
assert (len(repo.index.diff("HEAD")) == 0) # Staged
47-
# check_step("everything is committed")
42+
assert len(repo.index.diff(None)) == 0, "there are un-committed changes to ApprovalTests.cpp" # Modified
43+
assert len(repo.index.diff("HEAD")) == 0, "there are un-committed changes to ApprovalTests.cpp" # Staged
4844

4945
# From https://stackoverflow.com/questions/15849640/how-to-get-count-of-unpublished-commit-with-gitpython
50-
assert (len(list(repo.iter_commits('master@{u}..master'))) == 0)
51-
# check_step("everything is pushed")
46+
assert len(
47+
list(repo.iter_commits('master@{u}..master'))) == 0, "there are un-pushed changes in ApprovalTests.cpp"
5248

5349
run(["open", "https://github.com/approvals/ApprovalTests.cpp/commits/master"])
5450
check_step("the builds are passing")

0 commit comments

Comments
 (0)