From 4f4d7b44de90575d2eaf89645202ce4d47164b98 Mon Sep 17 00:00:00 2001 From: Simon Posch Date: Thu, 9 Apr 2020 19:14:23 +0200 Subject: [PATCH] [STCC-241] Remove automatical build number incrementing Removes the injection of the pre-commit hook which increments the build number. After merging/rebasing this commit the file .git/hook/pre-commit should be deleted before committing. --- run | 1 - run_dbg | 1 - src/scratchtocatrobat/tools/helpers.py | 85 -------------------------- 3 files changed, 87 deletions(-) diff --git a/run b/run index 97f76134..1288831a 100755 --- a/run +++ b/run @@ -38,7 +38,6 @@ if not os.path.isdir(jython_home_dir): if not os.path.isfile(jython_exec_path): helpers.error("Jython script path '%s' must exist." % jython_exec_path.replace(".bat", "[.bat]")) -helpers.inject_git_commmit_hook() env = os.environ env['JYTHONPATH'] = jython_path if sys.platform != 'win32' else jython_path.replace(":", ";") diff --git a/run_dbg b/run_dbg index 1a8febd7..98e03516 100755 --- a/run_dbg +++ b/run_dbg @@ -39,7 +39,6 @@ if not os.path.isdir(jython_home_dir): if not os.path.isfile(jython_exec_path): helpers.error("Jython script path '%s' must exist." % jython_exec_path.replace(".bat", "[.bat]")) -helpers.inject_git_commmit_hook() env = os.environ env['JYTHONPATH'] = jython_path if sys.platform != 'win32' else jython_path.replace(":", ";") diff --git a/src/scratchtocatrobat/tools/helpers.py b/src/scratchtocatrobat/tools/helpers.py index b0067b0a..04323e59 100644 --- a/src/scratchtocatrobat/tools/helpers.py +++ b/src/scratchtocatrobat/tools/helpers.py @@ -245,91 +245,6 @@ def _setup_configuration(config_file_path = None): config = config_env return config -def inject_git_commmit_hook(): - git_dir = os.path.join(APP_PATH, ".git") - if not os.path.isdir(git_dir): # abort, this seems to be no valid git repository... - return - - hook_dir_path = os.path.join(git_dir, "hooks") - make_dir_if_not_exists(hook_dir_path) - hook_path = os.path.join(hook_dir_path, "pre-commit") - - config_default_file_path = os.path.normpath(os.path.join(CFG_PATH, CFG_DEFAULT_FILE_NAME)) - config_custom_env_file_path = os.path.normpath(os.path.join(CFG_PATH, CFG_CUSTOM_ENV_FILE_NAME)) - - def formatted_shell_script_code(content): - lines = content.split('\n') - formatted_lines = [] - ignore_line_indentation = False - python_code_line_indentation = -1 - update_python_code_line_indentation = False - for line in lines[1:]: # skip first line - if "<