Fix -d flag by hardcoding default branch to origin/main #18
|
@ -31,13 +31,12 @@ def build_rust_packages(default_branch=False):
|
|||
print("[ BUILIDING SERVICE {} ]".format(service_name))
|
||||
# this arg ensures we build the default branch, otherwise we build what ever is found locally
|
||||
if default_branch:
|
||||
# because some repo have main as default and some as master, we get the default
|
||||
default_branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'origin/HEAD'],
|
||||
cwd=service_path).decode(sys.stdout.encoding).strip()
|
||||
branch = default_branch.replace('origin/', '')
|
||||
remote_branch = 'origin/main'
|
||||
branch = 'main'
|
||||
subprocess.check_call(["git", "reset", "HEAD", "--hard"])
|
||||
subprocess.check_call(["git", "checkout", branch], cwd=service_path)
|
||||
subprocess.check_call(["git", "fetch", "--all"], cwd=service_path)
|
||||
subprocess.check_call(["git", "reset", "--hard", default_branch], cwd=service_path)
|
||||
subprocess.check_call(["git", "reset", "--hard", remote_branch], cwd=service_path)
|
||||
debian_package_path = subprocess.check_output(
|
||||
[
|
||||
CARGO_PATH,
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#rsync -avzh --delete -e "ssh -i /Users/maxfowler/.ssh/peach_rsa" . notplants@167.99.136.8:/srv/peachcloud/automation/peach-vps
|
||||
KEY_FILE=/Users/notplants/.ssh/peach_rsa
|
||||
rsync -avzh --exclude target --exclude .idea --exclude .git --delete -e "ssh -i $KEY_FILE" . notplants@167.99.136.83:/srv/peachcloud/automation/peach-package-builder/
|
||||
#ssh -i ./secret_files/do_rsa root@159.89.5.141
|
||||
#ssh -i /home/notplants/.ssh/peach_rsa rust@167.99.136.83 'cd /srv/peachcloud/automation/peach-vps/; python3 scripts/build_packages.py'
|
||||
#echo "cd /srv/src/peach-vps; python3 scripts/setup_vps.py"
|
Loading…
Reference in New Issue