Skip to content

Commit

Permalink
build.deploy: push with --force-with-lease
Browse files Browse the repository at this point in the history
Rebases on non-main branches require a manual push otherwise, the main
branch should still be protected due to the checks above.
  • Loading branch information
div72 committed Sep 16, 2024
1 parent 399196e commit 39e82c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ deploy:
@# Check if current branch is rebased to main. This can cause a rollback of changes otherwise.
@git branch --contains $$(git log --format=format:%H -1 main) | grep -q $$(git rev-parse --abbrev-ref HEAD) \
|| (echo "ERROR: Branch is not rebased to master, please rebase." && exit 1)
git push server
git push --force-with-lease server
@# Agent forwarding allows using sudo using the local agent.
ssh -tt -A $(USER)@ozguryazilimhacettepe.com "cd /etc/nixos && git checkout $$(git rev-parse --abbrev-ref HEAD) && sudo nixos-rebuild switch"

Expand Down

0 comments on commit 39e82c8

Please sign in to comment.