-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (28 loc) · 845 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TAG?=latest
NAME:=fodinfo
DOCKER_REPOSITORY:=ghcr.io/pecigonzalo
DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME)
GIT_COMMIT:=$(shell git describe --dirty --always)
VERSION:=$(shell grep -oP '(?<=<VersionPrefix>).*?(?=</VersionPrefix>)' src/fodinfo.fsproj)
default: build-container
.PHONY: test
test:
test/e2e.sh
build:
dotnet build \
-p:VersionSuffix=rc \
-p:SourceRevisionId=$(GIT_COMMIT) \
-p:RepositoryUrl=https://github.com/pecigonzalo/fodinfo \
-p:RepositoryType=git
build-charts:
helm lint charts/*
helm package charts/*
build-container:
docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) .
push-container:
docker tag $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_NAME):latest
docker push $(DOCKER_IMAGE_NAME):$(VERSION)
docker push $(DOCKER_IMAGE_NAME):latest
release:
git tag $(VERSION)
git push origin $(VERSION)