Ensure certs exist before running linting
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
IamTheFij 2021-02-17 10:22:22 -08:00
parent 0b0b7fe395
commit a47d73b669
2 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,9 @@ name: test
steps:
- name: check
image: iamthefij/drone-pre-commit:personal
commands:
- make certs
- pre-commit run --all-files
---
kind: pipeline

View File

@ -19,19 +19,21 @@ test:
pre-commit run --all-files
go test
slack-status: $(GOFILES) certs/key.pem
slack-status: $(GOFILES) certs
go build -o $(OUTPUT)
.PHONY: dist
dist: $(DIST_TARGETS)
$(DIST_TARGETS): $(GOFILES) certs/key.pem
$(DIST_TARGETS): $(GOFILES) certs
@mkdir -p ./dist
GOOS=$(word 3, $(subst -, ,$(@))) GOARCH=$(word 4, $(subst -, ,$(@))) \
go build \
-ldflags '-X "main.version=${VERSION}" -X "main.defaultClientID=$(CLIENT_ID)" -X "main.defaultClientSecret=$(CLIENT_SECRET)"' \
-o $@
.PHONY: certs
certs: certs/key.pem
certs/cert.pem: certs/key.pem
certs/key.pem:
mkdir -p certs/