Merge pull request #17 from peachcloud/reset

Use more reliable method of getting latest code from origin/main during package building
This commit is contained in:
Max Fowler 2021-03-22 11:44:14 +01:00 committed by GitHub
commit 854e0b62c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

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",

View File

@ -36,8 +36,8 @@ def build_rust_packages(default_branch=False):
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)
debian_package_path = subprocess.check_output(
[
CARGO_PATH,