-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (30 loc) · 1.32 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: default
default: | help
.PHONY: pipx-install
pipx-install: ## Install with pipx from PyPI
pipx install dapla-cli
.PHONY: pipx-install-dev
pipx-install-dev: ## Install with pipx from the source code in editable mode
pipx install --editable .
.PHONY: build-docker
build-docker: ## Build local Docker image for testing in an isolated environment
docker build -f ./dev/Dockerfile -t dapla-cli ./dev
.PHONY: run-isolated
run-isolated: build-docker ## Run Dapla CLI in isolated environment (Docker container) using latest release from PyPI
docker run -it dapla-cli
.PHONY: run-isolated-dev
run-isolated-dev: build-docker ## Run Dapla CLI in isolated environment (Docker container) using latest release from local source (in editable mode)
docker run -v $(PWD)/:/mnt/dapla-cli -it dapla-cli
.PHONY: release-patch
release-patch: ## Bump patch version, push new release branch and create PR
git checkout main
git branch -D release || true
poetry version patch
git checkout -b release
git add pyproject.toml
git commit -m "Release version $$(poetry version -s)"
git push origin release
gh pr create --title "Release v$(poetry version -s)" --body "" --base main --label "skip-changelog"