generated from astronomer/airflow-provider-sample
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
37 lines (31 loc) · 1.05 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
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: setup-dev
setup-dev: ## Setup development environment
python3 -m venv venv
. venv/bin/activate && pip install .[tests]
@echo "To activate the virtual environment, run:"
@echo "source venv/bin/activate"
.PHONY: build-whl
build-whl: setup-dev ## Build installable whl file
# Delete any previous wheels, so different versions don't conflict
rm dev/include/*
cd dev
python3 -m build --outdir dev/include/
.PHONY: docker-run
docker-run: build-whl ## Runs local Airflow for testing
@if ! lsof -i :8080 | grep LISTEN > /dev/null; then \
cd dev && astro dev start; \
else \
cd dev && astro dev restart; \
fi
.PHONY: astro-login
astro-login: # Login to Astro cloud
cd dev && astro login cloud.astronomer-stage.io
.PHONY: deploy
deploy: build-whl astro-login ## Runs local Airflow for testing
cd dev && astro deploy -f
.PHONY: docker-stop
docker-stop: ## Stop Docker container
cd dev && astro dev stop