-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
39 lines (32 loc) · 1 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
BINARY_NAME=cobbler
EXECUTOR?=docker
build:
@echo "building package"
go build -o ${BINARY_NAME} main.go
@echo "creating shell completions"
make shell_completions
build-docker:
@echo "building docker"
${EXECUTOR} build -t cobbler/cli:latest -f packaging/docker/Dockerfile .
clean:
go clean
rm -f ${BINARY_NAME}
rm -rf config/completions/*
cleandoc: ## Cleans the docs directory.
@echo "cleaning documentation"
@cd docs; make clean > /dev/null 2>&1
doc:
@echo "creating: documentation"
@cd docs; make html
run:
go build -o ${BINARY_NAME} main.go
./${BINARY_NAME}
shell_completions:
@mkdir -p config/completions/bash
@mkdir -p config/completions/fish
@mkdir -p config/completions/powershell
@mkdir -p config/completions/zsh
./${BINARY_NAME} completion bash > config/completions/bash/cobbler
./${BINARY_NAME} completion fish > config/completions/fish/cobbler
./${BINARY_NAME} completion powershell > config/completions/powershell/cobbler
./${BINARY_NAME} completion zsh > config/completions/zsh/cobbler