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 \
|
2020-12-22 15:37:53 +01:00
|
|
|
-p 3000:3000 \
|
2020-12-21 15:56:56 +01:00
|
|
|
--tmpfs /app/data \
|
|
|
|
fake-sms:latest
|
|
|
|
|
|
|
|
docker-release:
|
2024-02-26 15:20:26 +01:00
|
|
|
docker tag fake-sms:latest reg.cadoles.com/cadoles/fake-sms:latest
|
|
|
|
docker tag fake-sms:latest reg.cadoles.com/cadoles/fake-sms:$(DOCKER_DATE_TAG)
|
|
|
|
docker login reg.cadoles.com
|
|
|
|
docker push reg.cadoles.com/cadoles/fake-sms:latest
|
|
|
|
docker push reg.cadoles.com/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:
|
2023-01-02 10:37:53 +01:00
|
|
|
go get github.com/cortesi/modd/cmd/modd
|
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
|