forked from chasdevs/avro-to-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 1.02 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
SHELL := /bin/bash
# Colors used for more helpful log statements.
END=$(shell printf "\x1b[0m")
OK_COLOR=$(shell printf "\x1b[32;01m")
ERROR_COLOR=$(shell printf "\x1b[31;01m")
WARN_COLOR=$(shell printf "\x1b[33;01m")
# Log levels.
OK=$(OK_COLOR)[OK]$(END)
ERROR=$(ERROR_COLOR)[ERROR]$(END)
WARN=$(WARN_COLOR)[WARNING]$(END)
ERROR_STRING=$(ERROR_COLOR)%s$(END) # printf '$(ERROR_STRING) %s' 'Error text in red.' 'Rest of text in no color.'
VER?=3.2.0
.PHONY: init test release image
init:
composer install
# $(OK) init
test:
vendor/bin/phpunit tests
# $(OK) test
release:
./avro-to-php app:build --build-version=$(VER) avro-to-php
git add .
git commit -m "$(VER)"
git tag "$(VER)"
git push && git push --tag
# $(OK) released to github and packagist
make image
image:
docker build -t chasdevs/avro-to-php --no-cache .
docker tag chasdevs/avro-to-php chasdevs/avro-to-php:$(VER)
docker push chasdevs/avro-to-php:latest
docker push chasdevs/avro-to-php:$(VER)
# $(OK) Published to dockerhub
avsc:
gradle generateAvsc