-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (35 loc) · 940 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
36
37
38
39
40
41
42
# Variables
DOCKER_IMAGE=alvarofpp/s2client
DOCKER_IMAGE_LINTER=alvarofpp/linter:latest
ROOT=$(shell pwd)
DIR=image/
LINT_COMMIT_TARGET_BRANCH=origin/main
VERSION=4.10
# Commands
.PHONY: install-hooks
install-hooks:
git config core.hooksPath .githooks
.PHONY: build
build: install-hooks
@docker build --build-arg VERSION=${VERSION} ${DIR} -t alvarofpp/s2client:${VERSION}
.PHONY: build-all
build-all: install-hooks
@./make_all.sh
.PHONY: build-no-cache
build-no-cache: install-hooks
@docker build --build-arg VERSION=${VERSION} ${DIR} -t alvarofpp/s2client:${VERSION} --no-cache
.PHONY: push
push:
@docker push ${DOCKER_IMAGE}:${VERSION}
.PHONY: push-all
push-all:
@./push_all.sh
.PHONY: lint
lint:
@docker pull ${DOCKER_IMAGE_LINTER}
@docker run --rm -v ${ROOT}:/app ${DOCKER_IMAGE_LINTER} " \
lint-commit ${LINT_COMMIT_TARGET_BRANCH} \
&& lint-markdown \
&& lint-dockerfile \
&& lint-shell-script \
&& lint-yaml"