From cf9de3927839a9b3cf095a08d2fcd5a37022597e Mon Sep 17 00:00:00 2001 From: Vikram Singh Date: Thu, 24 Oct 2024 17:21:01 +0530 Subject: [PATCH] added makefile --- Makefile | 23 +++++++++++++++++++++++ chart-sync/Makefile | 6 ++++++ git-sensor/Makefile | 5 +++++ kubelink/Makefile | 6 ++++++ kubewatch/Makefile | 7 +++++++ lens/Makefile | 9 ++++++++- 6 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..a44e1a264 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ + +TARGET_BRANCH?=main + +all: build + +dep-update-oss: + cd git-sensor && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd chart-sync && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd ci-runner && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd common-lib && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd kubelink && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd kubewatch && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + cd lens && TARGET_BRANCH=$(TARGET_BRANCH) $(MAKE) dep-update-oss + +build: + cd chart-sync && $(MAKE) + cd ci-runner && $(MAKE) +# cd devtctl && $(MAKE) + cd git-sensor && $(MAKE) + cd kubelink && $(MAKE) + cd kubewatch && $(MAKE) + cd lens && $(MAKE) +# cd common-lib && $(MAKE) \ No newline at end of file diff --git a/chart-sync/Makefile b/chart-sync/Makefile index 45a2f0381..ac7862f4e 100644 --- a/chart-sync/Makefile +++ b/chart-sync/Makefile @@ -35,3 +35,9 @@ docker-build-image: build docker-build-push: docker-build-image docker tag chart-sync:${TAG} ${REGISTRY}/chart-sync:${TAG} docker push ${REGISTRY}/chart-sync:${TAG} + +dep-update-oss: + go mod edit -replace=github.com/devtron-labs/common-lib=github.com/devtron-labs/devtron-services/common-lib@$(TARGET_BRANCH) \ + -replace=github.com/devtron-labs/chart-sync=github.com/devtron-labs/devtron-services/chart-sync@$(TARGET_BRANCH) + go mod tidy + go mod vendor diff --git a/git-sensor/Makefile b/git-sensor/Makefile index 5388ad378..3761c38ed 100644 --- a/git-sensor/Makefile +++ b/git-sensor/Makefile @@ -37,5 +37,10 @@ run: build # docker tag orchestrator:${TAG} ${REGISTRY}/orchestrator:${TAG} # docker push ${REGISTRY}/orchestrator:${TAG} +dep-update-oss: + go mod edit -replace=github.com/devtron-labs/common-lib=github.com/devtron-labs/devtron-services/common-lib@$(TARGET_BRANCH) \ + -replace=github.com/devtron-labs/git-sensor=github.com/devtron-labs/devtron-services/git-sensor@$(TARGET_BRANCH) + go mod tidy + go mod vendor diff --git a/kubelink/Makefile b/kubelink/Makefile index 8a07fd259..e0af129e9 100644 --- a/kubelink/Makefile +++ b/kubelink/Makefile @@ -27,3 +27,9 @@ clean: run: build ./kubelink +dep-update-oss: + go mod edit -replace=github.com/devtron-labs/common-lib=github.com/devtron-labs/devtron-services/common-lib@$(TARGET_BRANCH) \ + -replace=github.com/devtron-labs/kubelink=github.com/devtron-labs/devtron-services/kubelink@$(TARGET_BRANCH) + go mod tidy + go mod vendor + diff --git a/kubewatch/Makefile b/kubewatch/Makefile index cd436ed50..34d7725b4 100644 --- a/kubewatch/Makefile +++ b/kubewatch/Makefile @@ -29,3 +29,10 @@ clean-images: stop clean: "$(GOCMD)" clean -i + + +TARGET_BRANCH?=main +dep-update-oss: + go mod edit -replace=github.com/devtron-labs/common-lib=github.com/devtron-labs/devtron-services/common-lib@$(TARGET_BRANCH) + go mod tidy + go mod vendor diff --git a/lens/Makefile b/lens/Makefile index ed18e8ea8..65dfa1bae 100644 --- a/lens/Makefile +++ b/lens/Makefile @@ -27,4 +27,11 @@ run: build .PHONY: build docker-build-image: build - docker build -t lens:$(TAG) . \ No newline at end of file + docker build -t lens:$(TAG) . + + +TARGET_BRANCH?=main +dep-update-oss: + go mod edit -replace=github.com/devtron-labs/common-lib=github.com/devtron-labs/devtron-services/common-lib@$(TARGET_BRANCH) + go mod tidy + go mod vendor \ No newline at end of file