-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 777 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 777 Bytes
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
.PHONY: help
help:
@echo "Welcome to helper of Makefile"
@echo "Use `make <target>` where <target> is one of:"
@echo "key-gen creating a couple of keys and login and password files in secret directory"
@echo "lines return a total lines of code in project"
@echo "build create a binary file"
@echo "dock/run run docker compose"
.PHONY: key-gen
key-gen: secret
secret: create-dir gen-private-key gen-public-key
create-dir:
@mkdir -p certs
gen-private-key:
@openssl genrsa -out certs/private_key.pem 2048
gen-public-key:
@openssl rsa -in certs/private_key.pem -pubout -outform PEM -out certs/public_key.pem
.PHONY: lines
lines:
git ls-files | xargs wc -l
.PHONY: build
build:
go build -o app.o ./cmd/app/
.PHONY: dock/run
dock/run:
docker compose up --build -d