diff --git a/Makefile b/Makefile index 3c50231bee..241c62c132 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ ZITADEL_MASTERKEY ?= MasterkeyNeedsToHave32Characters export GOCOVERDIR ZITADEL_MASTERKEY +LOGIN_REMOTE_NAME := login +LOGIN_REMOTE_URL := https://github.com/zitadel/typescript.git + .PHONY: compile compile: core_build console_build compile_pipeline @@ -165,3 +168,16 @@ core_lint: --config ./.golangci.yaml \ --out-format=github-actions \ --concurrency=$$(getconf _NPROCESSORS_ONLN) + +.PHONY: login-pull +login-pull: login-ensure-remote + git fetch $(LOGIN_REMOTE_NAME) + git subtree pull --prefix=login $(LOGIN_REMOTE_NAME) main + +.PHONY: login-push +login-push: login-ensure-remote + git subtree push --prefix=login $(LOGIN_REMOTE_NAME) main --squash + +login-ensure-remote: + @git remote -v | grep $(LOGIN_REMOTE_NAME) || \ + git remote add $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_URL)