-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (30 loc) · 1.1 KB
/
Copy pathmakefile
File metadata and controls
38 lines (30 loc) · 1.1 KB
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
VERSION="1.0"
pname="website"
SHELL := /bin/bash
message="Making a new commit."
.PHONY: help requirements.txt build git pip create start version
help: ## Shows this help
@grep -E '^[.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
version: ## Shows this version
@echo "A versão do Makefile é: $(VERSION)"
venv: ## Create a new Python virtual environment
@python3 -m venv venv
pip: venv requirements.txt ## Installing the dependencies on virtual environment
@source venv/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install --trusted-host pypi.org --trusted-host files.pythonhosted.org --no-cache-dir -r requirements.txt
create: ## Create a new website
@source venv/bin/activate \
&& mkdocs new $(pname)
start: build ## Start the dev env
@source venv/bin/activate \
&& mkdocs serve
build: ## Build the project
@source venv/bin/activate \
&& mkdocs build
git: build ## Push to Github
@git fetch origin \
&& git add . \
&& git commit -m "$(message)" \
&& git pull --no-rebase origin \
&& git push origin