fake-sms/Makefile
2020-12-21 15:59:07 +01:00

58 lines
1.0 KiB
Makefile

DOCKER_DATE_TAG := $(shell date +%Y%m%d%H%M)
build:
CGO_ENABLED=0 go build -v -o bin/fake-sms ./cmd/fake-sms
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-sms:latest \
-f ./misc/docker/Dockerfile \
.
docker-run:
docker run \
--rm -it \
-p 8080:8080 \
-p 2525:2525 \
--tmpfs /app/data \
fake-sms:latest
docker-release:
docker tag fake-sms:latest bornholm/fake-sms:latest
docker tag fake-sms:latest bornholm/fake-sms:$(DOCKER_DATE_TAG)
docker login
docker push bornholm/fake-sms:latest
docker push bornholm/fake-sms:$(DOCKER_DATE_TAG)
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
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