forked from podlove/podlove-publisher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
105 lines (90 loc) · 3.26 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
prepareTest:
bash bin/install-wp-tests.sh wordpress_test root '' localhost latest
test:
./vendor/bin/phpunit -c phpunit.xml
release:
bin/release.sh
format:
php-cs-fixer fix . --config .php-cs-fixer.dist.php
validateFormat:
php-cs-fixer fix . --config .php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no
update_subscribe_button:
rm -rf .tmppsb
git clone https://github.com/podlove/podlove-subscribe-button.git .tmppsb
rm -rf lib/modules/subscribe_button/dist
mv .tmppsb/dist lib/modules/subscribe_button/dist
rm -rf .tmppsb
player:
mkdir -p $(player_dst)/bin
mkdir -p $(player_dst)/css
mkdir -p $(player_dst)/img
mkdir -p $(player_dst)/js/vendor
cp -r $(player_src)/css/vendor $(player_dst)/css/vendor
cp -r $(player_src)/img/* $(player_dst)/img
cp -r $(player_src)/js/*.min.js $(player_dst)/js
cp -r $(player_src)/js/vendor/*.min.js $(player_dst)/js/vendor
composer_with_prefixing:
mkdir -p vendor-prefixed
composer install --no-progress --prefer-dist --optimize-autoloader --no-dev
composer prefix-dependencies
rm -rf vendor/matomo
rm -rf vendor/twig
rm -rf vendor/monolog
rm -rf vendor/psr
composer dump-autoload --classmap-authoritative
# composer install --no-progress --prefer-dist --optimize-autoloader --no-dev
install_php_scoper:
mkdir -p vendor-prefixed
composer require --dev bamarni/composer-bin-plugin:1.4.1
composer bin php-scoper config minimum-stability dev
composer bin php-scoper config prefer-stable true
composer bin php-scoper require --dev --update-with-all-dependencies humbug/php-scoper:0.17.5
client_legacy:
cd js && npm install
cd js && NODE_ENV=production npm run build
client_next:
cd client && npm install
cd client && NODE_ENV=production npm run build
client: client_legacy client_next
build:
make composer_with_prefixing
make client
rm -rf dist/*
mkdir -p dist
# move everything into dist
rsync -r --exclude=.git --exclude=node_modules --exclude=./dist . dist
# cleanup
find dist -name "*.git*" | xargs rm -rf
rm -rf dist/lib/modules/podlove_web_player/player_v2/player/podlove-web-player/libs
rm -rf dist/lib/modules/podlove_web_player/player_v2/player/podlove-web-player/img/banner-772x250.png
rm -rf dist/lib/modules/podlove_web_player/player_v2/player/podlove-web-player/img/banner-1544x500.png
rm -rf dist/client/src
rm -rf dist/client/package-lock.json
rm -rf dist/tests
rm -rf dist/vendor-bin
rm -rf dist/vendor/bin
rm -rf dist/vendor/phpunit/php-code-coverage
rm -rf dist/vendor/phpunit/phpunit
rm -rf dist/vendor/phpunit/phpunit-mock-objects
rm -rf dist/vendor/twig/twig/test
rm -rf dist/vendor/guzzle/guzzle/tests
rm -f dist/.travis.yml
rm -rf dist/bin
rm -f dist/wprelease.yml
rm -f dist/CONTRIBUTING.md
rm -f dist/Makefile
rm -f dist/phpunit.xml
rm -f dist/Rakefile
rm -f dist/README.md
rm -f dist/*.code-workspace
rm -f dist/.prettierrc
rm -f dist/.editorconfig
find dist -name "*composer.json" | xargs rm -rf
find dist -name "*composer.lock" | xargs rm -rf
find dist -name "*.swp" | xargs rm -rf
# find dist/vendor -type d -iname "test" | xargs rm -rf
# find dist/vendor -type d -iname "tests" | xargs rm -rf
# player v2 / mediaelement
find dist -iname "echo-hereweare.*" | xargs rm -rf
find dist -iname "*.jar" | xargs rm -rf
install: install_php_scoper composer_with_prefixing