mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add docker-build and docker-install targets to Makefile
This commit is contained in:
parent
571526b993
commit
752cda88e3
17
Makefile
17
Makefile
@ -1,4 +1,4 @@
|
|||||||
.PHONY: build clean contrib_check coverage help install isntall lint run size test uninstall
|
.PHONY: build clean contrib_check coverage docker-build docker-install help install isntall lint run size test uninstall
|
||||||
|
|
||||||
# detect GOPATH if not set
|
# detect GOPATH if not set
|
||||||
ifndef $(GOPATH)
|
ifndef $(GOPATH)
|
||||||
@ -48,6 +48,21 @@ coverage:
|
|||||||
go test -coverprofile=coverage.out ./...
|
go test -coverprofile=coverage.out ./...
|
||||||
go tool cover -html=coverage.out
|
go tool cover -html=coverage.out
|
||||||
|
|
||||||
|
## docker-build: builds in docker
|
||||||
|
docker-build:
|
||||||
|
@echo "Building ${APP} in Docker..."
|
||||||
|
docker build -t wtfutil:build --build-arg=version=master -f Dockerfile.build .
|
||||||
|
@echo "Done with docker build"
|
||||||
|
|
||||||
|
## docker-install: installs a local version of the app from docker build
|
||||||
|
docker-install:
|
||||||
|
@echo "Installing ${APP}..."
|
||||||
|
docker create --name wtf_build wtfutil:build
|
||||||
|
docker cp wtf_build:/usr/local/bin/wtfutil ~/.local/bin/
|
||||||
|
$(eval INSTALLPATH = $(shell which ${APP}))
|
||||||
|
@echo "${APP} installed into ${INSTALLPATH}"
|
||||||
|
docker rm wtf_build
|
||||||
|
|
||||||
## gosec: runs the gosec static security scanner against the source code
|
## gosec: runs the gosec static security scanner against the source code
|
||||||
gosec:
|
gosec:
|
||||||
gosec -tests ./...
|
gosec -tests ./...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user