forked from TrueCloudLab/neoneo-go
Update command to build and publish images
- Use nspcc-dev docker hub repository - Add command to publish neo-go images
This commit is contained in:
parent
1774b87a86
commit
afbbdc5e02
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -14,6 +14,8 @@ REPO ?= "$(shell go list -m)"
|
||||||
VERSION ?= "$(shell git describe --tags 2>/dev/null | sed 's/^v//')"
|
VERSION ?= "$(shell git describe --tags 2>/dev/null | sed 's/^v//')"
|
||||||
BUILD_FLAGS = "-X $(REPO)/config.Version=$(VERSION)"
|
BUILD_FLAGS = "-X $(REPO)/config.Version=$(VERSION)"
|
||||||
|
|
||||||
|
IMAGE_REPO=nspccdev/neo-go
|
||||||
|
|
||||||
# All of the targets are phony here because we don't really use make dependency
|
# All of the targets are phony here because we don't really use make dependency
|
||||||
# tracking for files
|
# tracking for files
|
||||||
.PHONY: build deps image check-version clean-cluster push-tag push-to-registry \
|
.PHONY: build deps image check-version clean-cluster push-tag push-to-registry \
|
||||||
|
@ -48,8 +50,13 @@ postinst: install
|
||||||
|
|
||||||
image: deps
|
image: deps
|
||||||
@echo "=> Building image"
|
@echo "=> Building image"
|
||||||
@docker build -t cityofzion/neo-go:latest --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
@docker build -t $(IMAGE_REPO):latest --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
||||||
@docker build -t cityofzion/neo-go:$(VERSION) --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
@docker build -t $(IMAGE_REPO):$(VERSION) --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
||||||
|
|
||||||
|
image-push:
|
||||||
|
@echo "=> Publish image"
|
||||||
|
@docker push $(IMAGE_REPO):latest
|
||||||
|
@docker push $(IMAGE_REPO):$(VERSION)
|
||||||
|
|
||||||
check-version:
|
check-version:
|
||||||
git fetch && (! git rev-list ${VERSION})
|
git fetch && (! git rev-list ${VERSION})
|
||||||
|
|
Loading…
Reference in a new issue