-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
Makefile
49 lines (36 loc) · 1.92 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
##@ Makefile
##@ Define the default airbyte-ci version
AIRBYTE_CI_VERSION ?= latest
## Detect the operating system
OS := $(shell uname)
tools.airbyte-ci.install: tools.airbyte-ci.clean tools.airbyte-ci-binary.install tools.airbyte-ci.check
tools.airbyte-ci-binary.install: ## Install airbyte-ci binary
@python airbyte-ci/connectors/pipelines/pipelines/external_scripts/airbyte_ci_install.py ${AIRBYTE_CI_VERSION}
tools.airbyte-ci-dev.install: ## Install the local development version of airbyte-ci
@python airbyte-ci/connectors/pipelines/pipelines/external_scripts/airbyte_ci_dev_install.py
tools.airbyte-ci.check: ## Check if airbyte-ci is installed correctly
@./airbyte-ci/connectors/pipelines/pipelines/external_scripts/airbyte_ci_check.sh
tools.airbyte-ci.clean: ## Clean airbyte-ci installations
@./airbyte-ci/connectors/pipelines/pipelines/external_scripts/airbyte_ci_clean.sh
tools.git-hooks.clean: ## Clean git hooks
@echo "Unset core.hooksPath"
@git config --unset core.hooksPath || true
@echo "Removing pre-commit hooks..."
@pre-commit uninstall
@echo "Removing pre-push hooks..."
@rm -rf .git/hooks
@echo "Git hooks removed."
tools.pre-commit.install.Linux:
@echo "Installing pre-commit with pip..."
@pip install --user pre-commit
@echo "Pre-commit installation complete."
tools.pre-commit.install.Darwin:
@echo "Installing pre-commit with brew..."
@brew install pre-commit
@echo "Pre-commit installation complete"
tools.git-hooks.install: tools.airbyte-ci.install tools.pre-commit.install.$(OS) tools.git-hooks.clean ## Setup pre-commit hooks
@echo "Installing pre-commit hooks..."
@pre-commit install --hook-type pre-push
@echo "Pre-push hooks installed."
tools.install: tools.airbyte-ci.install tools.pre-commit.install.$(OS)
.PHONY: tools.install tools.pre-commit.install tools.git-hooks.install tools.git-hooks.clean tools.airbyte-ci.install tools.airbyte-ci-dev.install tools.airbyte-ci.check tools.airbyte-ci.clean