-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
27 lines (23 loc) · 1.1 KB
/
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
all: build
build: TAG=$(shell git describe --abbrev=0)
build: HASH=$(shell git rev-parse --short HEAD)
build:
docker run --rm --user "$(shell id -u)":"$(shell id -g)" -v $(shell pwd):/usr/src/myapp -w /usr/src/myapp rustlang/rust:nightly cargo +nightly build
docker build -t petergrace/pull-secret-operator:$(TAG) .
bump:
git pull origin main
cargo bump -g
$(eval TAG=`git describe --abbrev=0`)
yq w -i chart/pull-secret-operator/Chart.yaml appVersion $(TAG)
git add chart/pull-secret-operator/Chart.yaml
git commit -m "synchronizing chart appVer with current tag: $(TAG)"
gh-build: TAG=$(shell git describe --abbrev=0)
gh-build: HASH=$(shell git rev-parse --short HEAD)
gh-build:
cargo +nightly build --release
docker build -t petergrace/pull-secret-operator:$(HASH) .
docker tag petergrace/pull-secret-operator:$(HASH) petergrace/pull-secret-operator:$(TAG)
docker tag petergrace/pull-secret-operator:$(HASH) petergrace/pull-secret-operator:latest
docker push petergrace/pull-secret-operator:$(HASH)
docker push petergrace/pull-secret-operator:$(TAG)
docker push petergrace/pull-secret-operator:latest