Merge update from Common

This commit is contained in:
ducoterra
2021-11-02 11:57:26 -04:00
2 changed files with 6 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
SHELL := /bin/bash SHELL := /bin/bash
PROJECT_NAME ?= $(shell git config --local remote.origin.url|sed -n 's#.*/\([^.]*\)\.git#\1#p')
VERSION ?= $(shell cat VERSION) VERSION ?= $(shell cat VERSION)
IMAGE ?= $(shell cat IMAGE):$(VERSION) IMAGE ?= $(shell cat IMAGE):$(VERSION)
IMAGE_LATEST ?= $(shell cat IMAGE):latest IMAGE_LATEST ?= $(shell cat IMAGE):latest
@@ -24,11 +25,10 @@ make-stash-drop:
.PHONY: make-update .PHONY: make-update
make-update: make-update:
-git subtree pull --prefix .gitlab --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main @git subtree pull --prefix .gitlab --message "Merge update from Common" -q common main
.PHONY: make-push .PHONY: make-push
make-push: warning make-push: warning
@make make-update @make make-update
@git remote add common git@gitlab.ducoterra.net:services/common.git @git subtree split --branch common/$(PROJECT_NAME) --prefix .gitlab
@git subtree push --prefix .gitlab common main @git push common common/$(PROJECT_NAME):common/$(PROJECT_NAME)
@git remote remove common

View File

@@ -2,7 +2,8 @@
```bash ```bash
# Add the subtree as a remote # Add the subtree as a remote
git subtree add --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash git remote add common git@gitlab.ducoterra.net:services/common.git
git subtree add --prefix .gitlab common main
# Now you can run the following to update # Now you can run the following to update
make make-update make make-update