Merge commit 'ecc25394717f9c7d9c2b748509123aba29dbe607'

This commit is contained in:
ducoterra
2021-11-02 16:04:36 -04:00
3 changed files with 5 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
SHELL := /bin/bash SHELL := /bin/bash
PROJECT_NAME ?= $(shell git config --local remote.origin.url|sed -n 's#.*/\([^.]*\)\.git#\1#p') 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
@@ -13,22 +13,6 @@ include .gitlab/make/kaniko.makefile
include .gitlab/make/truenas.makefile include .gitlab/make/truenas.makefile
include .gitlab/make/git.makefile include .gitlab/make/git.makefile
.PHONY: warning
warning:
@printf "Running a potentially destructive command. If a conflict occurs, fix the conflict and re-run the command.\n"
@printf "Cancel with ctrl + c within 3 seconds."
@sleep 3
.PHONY: make-stash-drop
make-stash-drop:
@if [ ! -z "$$(git stash list | grep -r 'stash@{0}.*common')" ]; then git stash drop; fi
.PHONY: make-update .PHONY: make-update
make-update: make-update:
@git subtree pull --prefix .gitlab --message "Merge update from Common" -q common main @git subtree pull --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main
.PHONY: make-push
make-push: warning
@make make-update
@git subtree split --branch common/$(PROJECT_NAME) --prefix .gitlab
@git push common common/$(PROJECT_NAME):common/$(PROJECT_NAME)

View File

@@ -2,8 +2,7 @@
```bash ```bash
# Add the subtree as a remote # Add the subtree as a remote
git remote add common git@gitlab.ducoterra.net:services/common.git git subtree add --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash --message "Add Common .gitlab Subtree"
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

View File

@@ -1,3 +1,5 @@
.PHONY: chart-release .PHONY: chart-release
chart-release: chart-release:
@rsync -av $(CHART)/helm/ charts/$(CHART)/$(shell cat $(CHART)/VERSION)/ @rsync -av $(CHART)/helm/ charts/$(CHART)/$(shell cat $(CHART)/VERSION)/
@git add charts/$(CHART)
@git commit -m "Automated release for chart $(CHART) version $(shell cat $(CHART)/VERSION)" -e