-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
59 lines (42 loc) · 1.54 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
repoversion=$(shell LANG=C aptitude show php-subreg | grep Version: | awk '{print $$2}')
nextversion=$(shell echo $(repoversion) | perl -ne 'chomp; print join(".", splice(@{[split/\./,$$_]}, 0, -1), map {++$$_} pop @{[split/\./,$$_]}), "\n";')
all: build install
fresh:
git pull
composer install
build:
echo build
clean:
rm -rf debian/php-subreg
rm -rf debian/subreg .phpunit.result.cache debian/subreg.debhelper.log
rm -rf debian/subreg-doc
rm -rf debian/*.log
rm -rf debian/*.substvars
rm -rf docs/*
rm -f debianTest/composer.lock
rm -rf vendor/* composer.lock
apigen:
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \
apigen generate --source src --destination docs --title "subreg ${VERSION}" --charset UTF-8 --access-levels public --access-levels protected --php --tree
test: pretest phpunit
pretest:
composer --ansi --no-interaction update
phpunit: pretest
vendor/bin/phpunit --bootstrap tests/bootstrap.php
deb:
dpkg-buildpackage -A -us -uc
rpm:
rpmdev-bumpspec --comment="Build" --userstring="Vítězslav Dvořák <info@vitexsoftware.cz>" subreg.spec
rpmbuild -ba subreg.spec
verup:
git commit debian/composer.json debian/version debian/revision -m "`cat debian/version`-`cat debian/revision`"
git push origin master
dimage:
docker build -t vitexsoftware/subreg .
release:
echo Release v$(nextversion)
dch -v $(nextversion) `git log -1 --pretty=%B | head -n 1`
debuild -i -us -uc -b
git commit -a -m "Release v$(nextversion)"
git tag -a $(nextversion) -m "version $(nextversion)"
.PHONY : install