fake-smtp/Makefile

57 lines
951 B
Makefile

build: vendor
CGO_ENABLED=0 go build -mod=vendor -v -o bin/fake-smtp ./cmd/fake-smtp
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
docker login
docker push bornholm/fake-smtp:latest
test:
go test -v -race ./...
release: dist
@./misc/script/release.sh
dist:
npm run build
vendor:
go mod vendor
tidy:
go mod tidy
watch:
modd
lint:
golangci-lint run --enable-all
tooling:
go get github.com/krishicks/yaml-patch/cmd/yaml-patch
clean:
rm -rf release
rm -rf data
rm -rf vendor
rm -rf bin
.PHONY: lint watch build vendor tidy release