File: Makefile

package info (click to toggle)
pacparser 1.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,060 kB
  • sloc: ansic: 78,141; makefile: 436; perl: 395; python: 299; sh: 149; asm: 46; javascript: 38
file content (26 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (2)
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
# Copyright (C) 2024 Manu Garg.
# Author: Manu Garg <manugarg@gmail.com>
#
# Makefile for pacparser docker image.
-include version.mk

VERSION ?= $(shell git describe --always --tags --candidate=100)

GIT_TAG := $(shell git describe --exact-match --exclude tip --tags HEAD 2>/dev/null || /bin/true)
GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))

DOCKER_IMAGE ?= manugarg/pactester
ifeq "$(GIT_TAG)" ""
	DOCKER_TAGS := -t $(DOCKER_IMAGE):master -t $(DOCKER_IMAGE):main
else
	DOCKER_TAGS := -t $(DOCKER_IMAGE):$(GIT_TAG) -t $(DOCKER_IMAGE):latest
endif

docker_multiarch: Dockerfile
	docker buildx build --push \
		--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
		--build-arg VERSION=$(VERSION) \
		--build-arg VCS_REF=$(GIT_COMMIT) \
		--platform linux/amd64,linux/arm64,linux/arm/v7 \
		$(DOCKER_TAGS) .