Use more reliable method of getting latest code from origin/main during package building #17

Merged
mhfowler merged 2 commits from reset into main 2021-03-22 10:44:14 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit be09c4afaf - Show all commits

View File

@ -31,8 +31,8 @@ def build_peach_config(default_branch=True):
cwd=service_path).decode(sys.stdout.encoding)
branch = default_branch.replace('origin/', '').strip()
subprocess.check_call(["git", "checkout", branch], cwd=service_path)
subprocess.check_call(["git", "reset", "HEAD", "--hard"], cwd=service_path)
subprocess.check_call(["git", "pull"], cwd=service_path)
subprocess.check_call(["git", "fetch", "--all"], cwd=service_path)
subprocess.check_call(["git", "reset", "--hard", default_branch], cwd=service_path)
# remove old build dir
subprocess.check_call([
"rm",