Fix -d flag

This commit is contained in:
notplants 2021-04-13 11:48:30 +02:00
parent a61972c74c
commit 3966dd9e83
2 changed files with 4 additions and 11 deletions

View File

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

View File

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