slack-bot/Makefile

19 lines
430 B
Makefile
Raw Normal View History

2021-03-21 23:17:15 +00:00
.PHONY: docker-build
BOT_VERSION=latest
GOARCH=amd64
# GOARCH=arm
GOOS=darwin
# GOOS=linux
build: dependencies
@echo "build for os $(GOOS) and arch $(GOARCH)"
go build -o bin/slackbot-$(GOOS)-$(GOARCH) cmd/main.go
dependencies:
go mod download
go mod verify
docker-build:
DOCKER_BUILDKIT=1 docker build --force-rm -t docker.registry:5000/slackbot:$(BOT_VERSION) .
docker push docker.registry:5000/slackbot:$(BOT_VERSION)