ddnsclient/Makefile

32 lines
758 B
Makefile
Raw Permalink Normal View History

2021-03-15 19:11:52 +01:00
GO := $(shell command -v go 2> /dev/null)
DOCKER := $(shell command -v docker 2> /dev/null)
RELEASE_VERSION ?= $(shell bash -c 'read -s -p "Release version: " pwd')
.PHONY: build
build:
ifndef GO
@echo "go is required!"
endif
@echo "building ddnsclient..."
@go build -o bin/ddnsclient cmd/main.go
@echo "module built!"
.PHONY: deploy-image-latest
2021-03-17 08:13:34 +01:00
deploy-image-latest:
2021-03-15 19:11:52 +01:00
ifndef DOCKER
@echo "docker is required!"
endif
@echo "Pushing image ddnsclient:latest to docker hub..."
@docker push ddnsclient:latest
@echo "Image pushed!"
2021-03-17 08:13:34 +01:00
.PHONY: deploy-image-release
deploy-image-release:
2021-03-15 19:11:52 +01:00
ifndef DOCKER
@echo "docker is required!"
endif
@echo "Pushing image with tag to docker hub..."
2021-03-15 19:11:52 +01:00
@docker push ddnsclient:$(RELEASE_VERSION)
@echo "Image pushed!"