fake-smtp/Makefile

58 lines
1.0 KiB
Makefile
Raw Permalink Normal View History

2020-11-03 12:43:16 +01:00
DOCKER_DATE_TAG := $(shell date +%Y%m%d%H%M)
2020-11-03 11:48:53 +01:00
build:
CGO_ENABLED=0 go build -v -o bin/fake-smtp ./cmd/fake-smtp
2020-04-17 17:53:01 +02:00
docker-image:
docker build \
--build-arg HTTP_PROXY=$(HTTP_PROXY) \
--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
--build-arg http_proxy=$(http_proxy) \
--build-arg https_proxy=$(https_proxy) \
-t fake-smtp:latest \
-f ./misc/docker/Dockerfile \
.
docker-run:
docker run \
--rm -it \
-p 8080:8080 \
-p 2525:2525 \
--tmpfs /app/data \
fake-smtp:latest
docker-release:
docker tag fake-smtp:latest bornholm/fake-smtp:latest
2020-11-03 12:43:16 +01:00
docker tag fake-smtp:latest bornholm/fake-smtp:$(DOCKER_DATE_TAG)
2020-04-17 17:53:01 +02:00
docker login
docker push bornholm/fake-smtp:latest
2020-11-03 12:43:16 +01:00
docker push bornholm/fake-smtp:$(DOCKER_DATE_TAG)
2020-04-17 17:53:01 +02:00
test:
go test -v -race ./...
release: dist
@./misc/script/release.sh
dist:
npm run build
tidy:
go mod tidy
watch:
modd
lint:
golangci-lint run --enable-all
2020-04-30 10:18:45 +02:00
tooling:
go get github.com/krishicks/yaml-patch/cmd/yaml-patch
2020-04-17 17:53:01 +02:00
clean:
rm -rf release
rm -rf data
rm -rf vendor
rm -rf bin
.PHONY: lint watch build vendor tidy release