-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
62 lines (53 loc) · 1.71 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
51
52
53
54
55
56
57
58
59
60
61
62
user=stashapp
repo=stash
tag=latest
IS_WIN_SHELL =
ifeq (${SHELL}, sh.exe)
IS_WIN_SHELL = true
endif
ifeq (${SHELL}, cmd)
IS_WIN_SHELL = true
endif
ifdef IS_WIN_SHELL
RM := del /s /q
RMDIR := rmdir /s /q
NOOP := @@
else
RM := rm -f
RMDIR := rm -rf
NOOP := @:
endif
.PHONY: build-info
build-info:
ifndef BUILD_DATE
$(eval BUILD_DATE := $(shell go run scripts/getDate.go))
endif
ifndef GITHASH
$(eval GITHASH := $(shell git rev-parse --short HEAD))
endif
ifndef STASH_VERSION
$(echo "STASHVERS")
endif
ifndef OFFICIAL_BUILD
$(eval OFFICIAL_BUILD := false)
endif
ifndef DOCKER_BUILD_ARGS
DOCKER_BUILD_ARGS = --build-arg BUILD_DATE="$(BUILD_DATE)" --build-arg GITHASH="$(GITHASH)" --build-arg STASH_VERSION="$(STASH_VERSION)" --build-arg OFFICIAL_BUILD="$(OFFICIAL_BUILD)"
endif
.PHONY: docker-build-base
docker-base: docker-bin
docker build ${DOCKER_BUILD_ARGS} --tag ${repo}:base --file dockerfile/ci-copy.Dockerfile .
.PHONY: docker-hwaccel-base
docker-hwaccel-base: docker-bin
docker build ${DOCKER_BUILD_ARGS} --tag ${repo}:hwaccel-base --file dockerfile/hwaccel-base.Dockerfile .
.PHONY: docker-hwaccel-deb
docker-hwaccel-deb: docker-hwaccel-base
docker build --build-arg UPSTREAM_IMAGE="${repo}:hwaccel-base" --tag ${repo}:${tag}-hwaccel-deb --file dockerfile/hwaccel-deb.Dockerfile .
.PHONY: docker-hwaccel-jf
docker-hwaccel-jf: docker-hwaccel-base
docker build --build-arg UPSTREAM_IMAGE="${repo}:hwaccel-base" --tag ${repo}:${tag}-hwaccel-jf --file dockerfile/hwaccel-jf.Dockerfile .
.PHONY: docker-alpine
docker-alpine: docker-bin
docker build ${DOCKER_BUILD_ARGS} --tag ${repo}:${tag}-alpine --file dockerfile/alpine.Dockerfile .
.PHONY: docker-build-all
docker-all: docker-hwaccel-deb docker-hwaccel-jf docker-alpine