Merge pull request #929 from mlaventure/tag-image-with-git-branch

Use git branch name as tag when building images
This commit is contained in:
Mrunal Patel 2016-07-01 15:11:51 -07:00 committed by GitHub
commit 7221e38782
1 changed files with 4 additions and 2 deletions

View File

@ -4,8 +4,10 @@
PREFIX := $(DESTDIR)/usr/local
BINDIR := $(PREFIX)/sbin
RUNC_IMAGE := runc_dev
RUNC_TEST_IMAGE := runc_test
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
RUNC_IMAGE := runc_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
RUNC_TEST_IMAGE := runc_test$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
PROJECT := github.com/opencontainers/runc
TEST_DOCKERFILE := script/test_Dockerfile
BUILDTAGS := seccomp