fake-sms/Makefile

57 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2020-12-21 15:56:56 +01:00
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 \
2020-12-21 15:56:56 +01:00
--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)
2020-12-21 15:56:56 +01:00
docker login
docker push cadoles/fake-sms:latest
docker push cadoles/fake-sms:$(DOCKER_DATE_TAG)
2020-12-21 15:56:56 +01:00
test:
go test -v -race ./...
release: dist
@./misc/script/release.sh
dist:
npm run build
tidy:
go mod tidy
watch:
2021-03-17 09:11:02 +01:00
go run github.com/cortesi/modd/cmd/modd
2020-12-21 15:56:56 +01:00
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