-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (43 loc) · 1.33 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
IMAGE_TAG ?= docker-phpunit
# All: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
# Supported by upstream PHP image: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
PLATFORM ?= linux/amd64
ACTION ?= load
PROGRESS_MODE ?= plain
.PHONY: update-tags docker-build docker-test test
docker-build:
# https://github.com/docker/buildx#building
docker buildx build \
--build-arg VCS_REF=`git rev-parse HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--tag $(IMAGE_TAG) \
--progress $(PROGRESS_MODE) \
--platform $(PLATFORM) \
--pull \
--$(ACTION) \
./docker
test: docker-test
docker-test:
docker run --rm ${IMAGE_TAG} --version
docker run --rm ${IMAGE_TAG} --help
update-tags:
git checkout 7
git tag -s -f -a -m "7.x.x series" 7
git checkout -
git push origin refs/tags/7 -f
git checkout 8
git tag -s -f -a -m "8.x.x series" 8
git checkout -
git push origin refs/tags/8 -f
git checkout 9
git tag -s -f -a -m "9.x.x series" 9
git checkout -
git push origin refs/tags/9 -f
git checkout 10
git tag -s -f -a -m "10.x.x series" 10
git checkout -
git push origin refs/tags/10 -f
git checkout main
git tag -s -f -a -m "latest series" latest
git checkout -
git push origin refs/tags/latest -f