-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
68 lines (47 loc) · 1.93 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
63
64
65
66
67
68
repoversion=$(shell LANG=C aptitude show php-ease-bootstrap4 | grep Version: | awk '{print $$2}')
nextversion=$(shell echo $(repoversion) | perl -ne 'chomp; print join(".", splice(@{[split/\./,$$_]}, 0, -1), map {++$$_} pop @{[split/\./,$$_]}), "\n";')
#DESTDIR ?= debian/php-ease-bootstrap4/DEBIAN
#libdir ?= /usr/share/php/Ease
#docdir ?= /doc/ease-bootstrap/bootstrap
all: build install
fresh:
git pull origin master
PACKAGE=`cat debian/composer.json | grep '"name"' | head -n 1 | awk -F'"' '{print $4}'`; \
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \
dch -b -v "${VERSION}" --package ${PACKAGE} "$CHANGES" \
composer install
#install:
# mkdir -p $(DESTDIR)$(libdir)
# cp -r src/Ease/ $(DESTDIR)$(libdir)
# cp -r debian/composer.json $(DESTDIR)$(libdir)
# mkdir -p $(DESTDIR)$(docdir)
# cp -r docs $(DESTDIR)$(docdir)
#build: doc
# echo build;
clean:
rm -rf vendor composer.lock
rm -rf debian/php-vitexsoftware-ease-bootstrap4
rm -rf debian/php-vitexsoftware-ease-bootstrap4-doc
rm -rf debian/*.log debian/tmp
rm -rf .phpdoc/*
apigen:
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \
apigen generate --source src --destination docs --title "Ease PHP Framework bootstrap4 ${VERSION}" --charset UTF-8 --access-levels public --access-levels protected --php --tree
composer:
composer update
phpunit:
vendor/bin/phpunit --bootstrap tests/Bootstrap.php --configuration phpunit.xml
deb:
dch -i "`git log -1 --pretty=%B`"
debuild -i -us -uc -b
rpm:
rpmdev-bumpspec --comment="`git log -1 --pretty=%B`" --userstring="Vítězslav Dvořák <[email protected]>" ease-bootstrap.spec
rpmbuild -ba ease-bootstrap.spec
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)"
openbuild:
.PHONY : install build