mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:07:36 +00:00
chore(login): migrate nextjs login to monorepo (#10134)
# Which Problems Are Solved We move the login code to the zitadel repo. # How the Problems Are Solved The login repo is added to ./login as a git subtree pulled from the dockerize-ci branch. Apart from the login code, this PR contains the changes from #10116 # Additional Context - Closes https://github.com/zitadel/typescript/issues/474 - Also merges #10116 - Merging is blocked by failing check because of: - https://github.com/zitadel/zitadel/pull/10134#issuecomment-3012086106 --------- Co-authored-by: Max Peintner <peintnerm@gmail.com> Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Florian Forster <florian@zitadel.com>
This commit is contained in:
50
Makefile
50
Makefile
@@ -12,11 +12,21 @@ ZITADEL_MASTERKEY ?= MasterkeyNeedsToHave32Characters
|
||||
|
||||
export GOCOVERDIR ZITADEL_MASTERKEY
|
||||
|
||||
LOGIN_REMOTE_NAME := login
|
||||
LOGIN_REMOTE_URL ?= https://github.com/zitadel/typescript.git
|
||||
LOGIN_REMOTE_BRANCH ?= main
|
||||
|
||||
.PHONY: compile
|
||||
compile: core_build console_build compile_pipeline
|
||||
|
||||
.PHONY: docker_image
|
||||
docker_image: compile
|
||||
docker_image:
|
||||
@if [ ! -f ./zitadel ]; then \
|
||||
echo "Compiling zitadel binary"; \
|
||||
$(MAKE) compile; \
|
||||
else \
|
||||
echo "Reusing precompiled zitadel binary"; \
|
||||
fi
|
||||
DOCKER_BUILDKIT=1 docker build -f build/Dockerfile -t $(ZITADEL_IMAGE) .
|
||||
|
||||
.PHONY: compile_pipeline
|
||||
@@ -165,3 +175,41 @@ core_lint:
|
||||
--config ./.golangci.yaml \
|
||||
--out-format=github-actions \
|
||||
--concurrency=$$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
.PHONY: login_pull
|
||||
login_pull: login_ensure_remote
|
||||
@echo "Pulling changes from the 'login' subtree on remote $(LOGIN_REMOTE_NAME) branch $(LOGIN_REMOTE_BRANCH)"
|
||||
git fetch $(LOGIN_REMOTE_NAME)
|
||||
git subtree pull --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH)
|
||||
|
||||
.PHONY: login_push
|
||||
login_push: login_ensure_remote
|
||||
@echo "Pushing changes to the 'login' subtree on remote $(LOGIN_REMOTE_NAME) branch $(LOGIN_REMOTE_BRANCH)"
|
||||
git subtree push --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH)
|
||||
|
||||
login_ensure_remote:
|
||||
@if ! git remote get-url $(LOGIN_REMOTE_NAME) > /dev/null 2>&1; then \
|
||||
echo "Adding remote $(LOGIN_REMOTE_NAME)"; \
|
||||
git remote add $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_URL); \
|
||||
else \
|
||||
echo "Remote $(LOGIN_REMOTE_NAME) already exists."; \
|
||||
fi
|
||||
@if [ ! -d login ]; then \
|
||||
echo "Adding subtree for 'login' from branch $(LOGIN_REMOTE_BRANCH)"; \
|
||||
git subtree add --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH); \
|
||||
else \
|
||||
echo "Subtree 'login' already exists."; \
|
||||
fi
|
||||
|
||||
export LOGIN_DIR := ./login/
|
||||
export LOGIN_BAKE_CLI_ADDITIONAL_ARGS := --set login-*.context=./login/ --file ./docker-bake.hcl
|
||||
export ZITADEL_TAG ?= $(ZITADEL_IMAGE)
|
||||
include login/Makefile
|
||||
|
||||
# Intentional override of login_test_acceptance_build
|
||||
login_test_acceptance_build: docker_image
|
||||
@echo "Building login test acceptance environment with the local zitadel image"
|
||||
$(MAKE) login_test_acceptance_build_compose login_test_acceptance_build_bake
|
||||
|
||||
login_dev: docker_image typescript_generate login_test_acceptance_build_compose login_test_acceptance_cleanup login_test_acceptance_setup_dev
|
||||
@echo "Starting login test environment with the local zitadel image"
|
||||
|
Reference in New Issue
Block a user