Skip to content
Snippets Groups Projects
Commit e77368c3 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Do not check gitlab token in makefile

parent d3137044
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,8 @@ ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
VERSION=$(shell git rev-parse --short HEAD)
TAG=arkindex-backend
build: require-gitlab
docker build $(ROOT_DIR) --build-arg GITLAB_TOKEN=${GITLAB_TOKEN} -t $(TAG):$(VERSION)
build:
docker build $(ROOT_DIR) -t $(TAG):$(VERSION)
publish-version: require-docker-auth
$(MAKE) build TAG=registry.gitlab.com/arkindex/backend
......@@ -20,9 +20,6 @@ release: require-version
require-docker-auth:
@grep registry.gitlab.com ~/.docker/config.json > /dev/null || (echo "Docker Login on registry.gitlab.com"; docker login registry.gitlab.com)
require-gitlab:
@if [ ! "${GITLAB_TOKEN}" ]; then echo "Missing GITLAB_TOKEN environment variable"; exit 1; fi
require-version:
@if [ ! "$(version)" ]; then echo "Missing version to publish"; exit 1; fi
@git rev-parse $(version) >/dev/null 2>&1 && (echo "Version $(version) already exists on local git repo !" && exit 1) || true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment