-
-
Notifications
You must be signed in to change notification settings - Fork 94
/
Makefile
61 lines (49 loc) · 2.45 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
VERSION=1.0.0dev
RELBASE=./releases
RELNAME=php-weathermap-$(VERSION)
RELDIR=$(RELBASE)/weathermap
all: ready manual release
random-bits/suite-1.png: random-bits/suite-1.conf
php weathermap --config random-bits/suite-1.conf --output random-bits/suite-1.png
random-bits/suite-2.png: random-bits/suite-2.conf
php weathermap --config random-bits/suite-2.conf --output random-bits/suite-2.png
ready: random-bits/suite-1.png random-bits/suite-2.png
manual: docs/index.html
php dump-keywords.php | pandoc --from=markdown --to=html5 -s -c keywords.css -o docs/keywords.html
$(MAKE) -C docs/src VERSION=$(VERSION)
cd docs/example && ./bodge-example.sh
clean:
rm random-bits/suite-1.png random-bits/suite-2.png docs/src/contents.xml
rm -rf $(RELBASE)
release:
#sql
# remove the dev-only dependencies from vendor
composer --no-dev update
bower install
# build the react apps (yarn copies the compiled files over)
cd websrc/cacti-user; yarn run build
cd websrc/cacti-mgmt; yarn run build
echo Building release $(RELNAME)
# mv $(RELDIR) $(RELDIR).$$
mkdir -p $(RELDIR)
tar cTf packing.list-core - | (cd $(RELDIR); tar xvf -)
cd $(RELBASE); zip -r $(RELNAME).zip weathermap/*
cd $(RELBASE); tar cvfz $(RELNAME).tgz weathermap
cd $(RELBASE); mv weathermap $(RELNAME)
echo $(RELNAME) built in $(RELBASE)
test:
echo "Linting for minimum and maximum PHP versions"
vendor/bin/parallel-lint -p php5.6 --exclude app --exclude vendor .
vendor/bin/parallel-lint -p php7.1 --exclude app --exclude vendor .
vendor/bin/parallel-lint -p php7.2 --exclude app --exclude vendor .
php -d xdebug.profiler_enable=off vendor/bin/phpunit -c build/phpunit.xml
grep Output test-suite/diffs/*.txt | grep -v '|0|' | awk -F: '{ print $1;}' | sed -e 's/.png.txt//' -e 's/test-suite\/diffs\///' > test-suite/failing-images.txt
php test-suite/make-failing-summary.php > test-suite/summary-failing.html
testcoverage:
php -d xdebug.profiler_enable=on vendor/bin/phpunit -c build/phpunit.xml --coverage-html test-suite/code-coverage/
sql:
mysqldump -n --add-drop-table --no-data -uroot -p cacti weathermap_maps > weathermap.sql
mysqldump -n --add-drop-table --no-data -uroot -p cacti weathermap_auth >> weathermap.sql
mysqldump -n --add-drop-table --no-data -uroot -p cacti weathermap_groups >> weathermap.sql
mysqldump -n --add-drop-table --no-data -uroot -p cacti weathermap_settings >> weathermap.sql
mysqldump -n --add-drop-table --no-data -uroot -p cacti weathermap_data >> weathermap.sql