forked from cshum/imagor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (37 loc) · 1.33 KB
/
Makefile
File metadata and controls
54 lines (37 loc) · 1.33 KB
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
build:
CGO_CFLAGS_ALLOW=-Xpreprocessor go build -o bin/imagor ./cmd/imagor/main.go
test:
go clean -testcache && CGO_CFLAGS_ALLOW=-Xpreprocessor go test -coverprofile=profile.cov $(shell go list ./... | grep -v /examples/ | grep -v /cmd/)
dev: build
./bin/imagor -debug -imagor-unsafe -upload-loader-enable
help: build
./bin/imagor -h
get:
go get -v -t -d ./...
docker-dev-build:
docker build -t imagor:dev .
docker-dev-run:
touch .env
docker run --rm -p 8000:8000 --env-file .env imagor:dev -debug -imagor-unsafe
docker-dev: docker-dev-build docker-dev-run
docker-magick-build:
docker build --build-arg ENABLE_MAGICK=true -t imagor:magick .
docker-magick-run:
touch .env
docker run --rm -p 8000:8000 --env-file .env imagor:magick -debug -imagor-unsafe
docker-magick: docker-magick-build docker-magick-run
docker-mozjpeg-build:
docker build --build-arg ENABLE_MOZJPEG=true -t imagor:mozjpeg .
docker-mozjpeg-run:
touch .env
docker run --rm -p 8000:8000 --env-file .env imagor:mozjpeg -debug -imagor-unsafe -vips-mozjpeg
docker-mozjpeg: docker-mozjpeg-build docker-mozjpeg-run
%-tag: VERSION:=$(if $(VERSION),$(VERSION),$$(./bin/imagor -version))
git-tag:
git tag "v$(VERSION)"
git push origin "refs/tags/v$(VERSION)"
reset-golden:
git rm -rf testdata/golden
git commit -m "test: reset golden"
git push
release: build git-tag