From da69418b0d0b2972dd8dd9d04b7e89a8b0b329b5 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sun, 31 Oct 2021 22:56:47 -0400 Subject: [PATCH] Switch to url-based subtree with `make-update` Add new `make-update` make command to update the .gitlab subtree. --- Makefile | 6 ++++++ README.md | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1575e0d..d431a5e 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,9 @@ include .gitlab/make/docker.makefile include .gitlab/make/helm.makefile include .gitlab/make/kaniko.makefile include .gitlab/make/truenas.makefile + +.PHONY: make-update +make-update: + @git stash + @git subtree pull --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash + @git stash pop diff --git a/README.md b/README.md index 1d084b1..8aa1cbe 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,8 @@ ```bash # Add the subtree as a remote -git remote add common git@gitlab.ducoterra.net:services/common.git -git subtree add --prefix .gitlab common main +git subtree add --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash # Now you can run the following to update -git subtree pull --prefix .gitlab common main +make make-update ```