From 79d691732d9fd1d374ce4710012d09fad30d357e Mon Sep 17 00:00:00 2001 From: Maxim Kurnikov Date: Mon, 15 Apr 2019 14:57:44 +0300 Subject: [PATCH] do not release if uncommitted changes --- release.xsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/release.xsh b/release.xsh index 77de153..76d89f5 100755 --- a/release.xsh +++ b/release.xsh @@ -1,9 +1,11 @@ #!/usr/local/bin/xonsh try: - pip install wheel twine - python setup.py sdist bdist_wheel - twine upload dist/* + no_uncommitted_changes = bool(!(git diff-index --quiet HEAD --)) + if no_uncommitted_changes: + pip install wheel twine + python setup.py sdist bdist_wheel + twine upload dist/* finally: rm -rf dist/ build/ \ No newline at end of file