fake-sms/Makefile

57 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 3000:3000 \
--tmpfs /app/data \
fake-sms:latest
docker-release:
docker tag fake-sms:latest cadoles/fake-sms:latest
docker tag fake-sms:latest cadoles/fake-sms:$(DOCKER_DATE_TAG)
docker login
docker push cadoles/fake-sms:latest
docker push cadoles/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