]> Lady’s Gitweb - Status/blobdiff - Makefile
New status @ 2024-01-06T01:20:49-05:00
[Status] / Makefile
index 6e6d778512cec4eb6e9d447c1b6f03d5c395b267..e37aad55da63206cf56723085461d109c6f03beb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,29 @@
-USERNAME := USERNAME
-DOMAIN := DOMAIN
-GIT_REPOSITORY := /home/$(USERNAME)/Status.git
+X_STATUS_GIT = https://git.ladys.computer/x_status_git.git
+
+update: FIRST_COMMIT = $(shell git rev-list --max-parents=0 live)
 
 nothing:
        @echo 'Type `make remote` to update the remote post-receive script.'
 
+update:
+       git pull
+       git remote add upstream $(X_STATUS_GIT)
+       git fetch upstream
+       git checkout --detach upstream/current
+       git reset --soft $(FIRST_COMMIT)
+       git commit --amend --no-edit
+       git tag base
+       git checkout live
+       git rebase --onto base $(FIRST_COMMIT)
+       git tag --delete base
+       git remote remove upstream
+
+clean:
+       git remote remove upstream || true
+       git tag --delete base || true
+       git checkout live
+
 remote:
-       scp post-receive $(USERNAME)@$(DOMAIN):$(GIT_REPOSITORY)/hooks/post-receive
+       scp post-receive computer:/srv/git/Status/hooks/post-receive
 
-.PHONY: nothing remote ;
+.PHONY: nothing remote update clean ;
This page took 0.023737 seconds and 4 git commands to generate.