From a78e06df2e2e54c82114fa07f8c6b3ced3f6acbe Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 25 Aug 2021 18:12:44 +0200 Subject: Makefile: Add update target Signed-off-by: Denis 'GNUtoo' Carikli --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 660f109..cd5467b 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ DESTDIR ?= /var/www/git.replicant.us +# For make update +REMOTE ?= origin +BRANCH ?= master + all: help install-sources help: @@ -11,6 +15,7 @@ help: @echo " directory for AGPLv3+ compliance" @echo "make install-hooks: Deploys a git hook to automatically instal the" @echo " source code on git checkout" + @echo "make update: Pull in last changes from upstream in the current git repository" install-hooks: hooks/post-checkout install $< -m 770 -t .git/hooks @@ -31,3 +36,10 @@ apache2.tar: apache2.tar.xz: apache2.tar rm -f $@ xz -9e --verbose $< + +update: + git fetch $(REMOTE) + git verify-commit $(REMOTE)/$(BRANCH) + git rebase $(REMOTE)/$(BRANCH) + make install-sources + systemctl reload apache2 -- cgit v1.2.3