frostfs-http-gw/Makefile

28 lines
708 B
Makefile
Raw Normal View History

2019-11-06 12:33:46 +00:00
VERSION ?= "$(shell git describe --tags 2>/dev/null | sed 's/^v//')"
HUB_IMAGE=nspccdev/neofs
B=\033[0;1m
G=\033[0;92m
R=\033[0m
# Show current version
version:
@echo $(VERSION)
# Make sure that all files added to commit
2019-11-18 16:59:59 +00:00
deps:
2019-11-06 12:33:46 +00:00
@printf "${B}${G}⇒ Ensure vendor${R}: "
2019-11-18 16:59:59 +00:00
@go mod tidy -v && echo OK || (echo fail && exit 2)
2019-11-06 12:33:46 +00:00
@printf "${B}${G}⇒ Download requirements${R}: "
2019-11-18 16:59:59 +00:00
@go mod download && echo OK || (echo fail && exit 2)
2019-11-06 12:33:46 +00:00
@printf "${B}${G}⇒ Store vendor localy${R}: "
2019-11-18 16:59:59 +00:00
@go mod vendor && echo OK || (echo fail && exit 2)
2019-11-06 12:33:46 +00:00
2019-11-18 16:59:59 +00:00
image: deps
2019-11-06 12:33:46 +00:00
@echo "${B}${G}⇒ Build GW docker-image ${R}"
@docker build \
--build-arg VERSION=$(VERSION) \
-f Dockerfile \
-t $(HUB_IMAGE)-http-gate:$(VERSION) .