Skip to content

Commit

Permalink
fix: makefile version
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandGouny committed Feb 18, 2021
1 parent fca89be commit c71c764
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
NAME = osixia/light-baseimage
VERSION = 0.1.8
VERSION = alpine-0.1.8

.PHONY: build build-nocache test tag-latest push push-latest release git-tag-version

build:
docker build -f image/Dockerfile -t $(NAME):alpine-$(VERSION) --rm image
docker build -f image/Dockerfile -t $(NAME):$(VERSION) --rm image

build-nocache:
docker build -f image/Dockerfile -t $(NAME):alpine-$(VERSION) --no-cache --rm image
docker build -f image/Dockerfile -t $(NAME):$(VERSION) --no-cache --rm image

test:
env NAME=$(NAME) VERSION=alpine-$(VERSION) bats test/test.bats
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats

tag:
docker tag $(NAME):alpine-$(VERSION) $(NAME):$(VERSION)
docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)

push:
docker push $(NAME):alpine-$(VERSION)
docker push $(NAME):$(VERSION)


release: build test tag-latest push push-latest

git-tag-version: release
git tag -a alpine-v$(VERSION) -m "v$(VERSION)"
git push origin alpine-v$(VERSION)
git-tag-version:
git tag -a alpine-v$(VERSION:alpine-%=%) -m "v$(VERSION:alpine-%=%)"
git push origin alpine-v$(VERSION:alpine-%=%)

0 comments on commit c71c764

Please sign in to comment.