diff --git a/tier0/hooks/post_gen_project.py b/tier0/hooks/post_gen_project.py index 4b8f82f3..12d5f842 100644 --- a/tier0/hooks/post_gen_project.py +++ b/tier0/hooks/post_gen_project.py @@ -8,9 +8,6 @@ RECEIVE_UPDATES = '{{cookiecutter.receive_updates}}' def createGithubRepo(): - subprocess.call(["git", "init", "-b", "main"]) - subprocess.call(["git", "add", "."]) - subprocess.call(["git", "commit", "-m", "first commit"]) gh_cli_command = [ "gh", "repo", "create", f"{ORG_NAME}/{REPO_NAME}", @@ -30,6 +27,10 @@ def addTopic(): ] subprocess.call(gh_cli_command) +subprocess.call(["git", "init", "-b", "main"]) +subprocess.call(["git", "add", "."]) +subprocess.call(["git", "commit", "-m", "initial commit"]) + if CREATE_REPO == "True": createGithubRepo() diff --git a/tier1/hooks/post_gen_project.py b/tier1/hooks/post_gen_project.py index 6af2bce2..5b332693 100644 --- a/tier1/hooks/post_gen_project.py +++ b/tier1/hooks/post_gen_project.py @@ -10,9 +10,6 @@ RECEIVE_UPDATES = '{{cookiecutter.receive_updates}}' def createGithubRepo(): - subprocess.call(["git", "init", "-b", "main"]) - subprocess.call(["git", "add", "."]) - subprocess.call(["git", "commit", "-m", "first commit"]) gh_cli_command = [ "gh", "repo", "create", f"{ORG_NAME}/{REPO_NAME}", @@ -43,6 +40,10 @@ def moveCookiecutterFile(): shutil.move(source_path, destination_path) def main(): + subprocess.call(["git", "init", "-b", "main"]) + subprocess.call(["git", "add", "."]) + subprocess.call(["git", "commit", "-m", "initial commit"]) + if CREATE_REPO == "True": createGithubRepo() diff --git a/tier2/hooks/post_gen_project.py b/tier2/hooks/post_gen_project.py index ca3202cc..59ccb6fa 100644 --- a/tier2/hooks/post_gen_project.py +++ b/tier2/hooks/post_gen_project.py @@ -11,9 +11,6 @@ ADD_MAINTAINER = '{{cookiecutter.add_maintainer}}' def createGithubRepo(): - subprocess.call(["git", "init", "-b", "main"]) - subprocess.call(["git", "add", "."]) - subprocess.call(["git", "commit", "-m", "first commit"]) gh_cli_command = [ "gh", "repo", "create", f"{ORG_NAME}/{REPO_NAME}", @@ -84,6 +81,10 @@ def moveCookiecutterFile(): shutil.move(source_path, destination_path) def main(): + subprocess.call(["git", "init", "-b", "main"]) + subprocess.call(["git", "add", "."]) + subprocess.call(["git", "commit", "-m", "initial commit"]) + if CREATE_REPO == "True": createGithubRepo() diff --git a/tier3/hooks/post_gen_project.py b/tier3/hooks/post_gen_project.py index 5faeb2e2..88098a6b 100644 --- a/tier3/hooks/post_gen_project.py +++ b/tier3/hooks/post_gen_project.py @@ -11,9 +11,6 @@ ADD_MAINTAINER = '{{cookiecutter.add_maintainer}}' def createGithubRepo(): - subprocess.call(["git", "init", "-b", "main"]) - subprocess.call(["git", "add", "."]) - subprocess.call(["git", "commit", "-m", "first commit"]) gh_cli_command = [ "gh", "repo", "create", f"{ORG_NAME}/{REPO_NAME}", @@ -77,6 +74,10 @@ def moveCookiecutterFile(): shutil.move(source_path, destination_path) def main(): + subprocess.call(["git", "init", "-b", "main"]) + subprocess.call(["git", "add", "."]) + subprocess.call(["git", "commit", "-m", "initial commit"]) + if CREATE_REPO == "True": createGithubRepo() diff --git a/tier4/hooks/post_gen_project.py b/tier4/hooks/post_gen_project.py index 5e032345..40801aa5 100644 --- a/tier4/hooks/post_gen_project.py +++ b/tier4/hooks/post_gen_project.py @@ -11,9 +11,6 @@ ADD_MAINTAINER = '{{cookiecutter.add_maintainer}}' def createGithubRepo(): - subprocess.call(["git", "init", "-b", "main"]) - subprocess.call(["git", "add", "."]) - subprocess.call(["git", "commit", "-m", "first commit"]) gh_cli_command = [ "gh", "repo", "create", f"{ORG_NAME}/{REPO_NAME}", @@ -77,6 +74,10 @@ def moveCookiecutterFile(): shutil.move(source_path, destination_path) def main(): + subprocess.call(["git", "init", "-b", "main"]) + subprocess.call(["git", "add", "."]) + subprocess.call(["git", "commit", "-m", "initial commit"]) + if CREATE_REPO == "True": createGithubRepo()