Skip to content

Commit

Permalink
Merge pull request #824 from thammegowda/patch-1
Browse files Browse the repository at this point in the history
heroku architect: fix default git branch name
  • Loading branch information
JackUrb authored Jul 15, 2022
2 parents 61b8da1 + 0cad230 commit 284b872
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mephisto/abstractions/architects/heroku_architect.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ def __setup_heroku_server(self) -> str:
server_dir = self.__get_build_directory()

print("Heroku: Starting server...")

branch = "main"
heroku_server_directory_path = os.path.join(server_dir, "router")
sh.git(shlex.split(f"-C {heroku_server_directory_path} init"))
sh.git(shlex.split(f"-C {heroku_server_directory_path} init -b {branch}"))

heroku_app_name = self.__get_app_name()

Expand Down Expand Up @@ -419,7 +419,9 @@ def __setup_heroku_server(self) -> str:
# commit and push to the heroku server
sh.git(shlex.split(f"-C {heroku_server_directory_path} add -A"))
sh.git(shlex.split(f'-C {heroku_server_directory_path} commit -m "app"'))
sh.git(shlex.split(f"-C {heroku_server_directory_path} push -f heroku master"))
sh.git(
shlex.split(f"-C {heroku_server_directory_path} push -f heroku {branch}")
)

os.chdir(heroku_server_directory_path)
subprocess.check_output(
Expand Down

0 comments on commit 284b872

Please sign in to comment.