catch KeyboardInterrupt

v1
Brett 2024-03-07 11:56:05 -05:00
parent 7ed84ab0bf
commit f477f8d9f2
2 changed files with 18 additions and 14 deletions

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
include(cmake/color.cmake) include(cmake/color.cmake)
set(BLT_VERSION 0.14.0) set(BLT_VERSION 0.14.1)
set(BLT_TEST_VERSION 0.0.1) set(BLT_TEST_VERSION 0.0.1)
set(BLT_TARGET BLT) set(BLT_TARGET BLT)

View File

@ -62,6 +62,8 @@ def inc_patch(cmake_text):
cmake_text = load_cmake() cmake_text = load_cmake()
cmake_version = get_version(cmake_text)[0] cmake_version = get_version(cmake_text)[0]
print(f"Current Version: {cmake_version}") print(f"Current Version: {cmake_version}")
try:
type = input("What kind of commit is this ((M)ajor, (m)inor, (p)atch)? ") type = input("What kind of commit is this ((M)ajor, (m)inor, (p)atch)? ")
if type.startswith('M'): if type.startswith('M'):
@ -77,3 +79,5 @@ elif type.startswith('p') or type.startswith('P') or len(type) == 0:
subprocess.call(["git", "add", "*"]) subprocess.call(["git", "add", "*"])
subprocess.call(["git", "commit"]) subprocess.call(["git", "commit"])
subprocess.call(["sh", "-c", "git remote | xargs -L1 git push --all"]) subprocess.call(["sh", "-c", "git remote | xargs -L1 git push --all"])
except KeyboardInterrupt:
print("\nCancelling!")