slack-bot/Makefile

19 lines
430 B
Makefile

.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)