-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
111 lines (81 loc) · 4.01 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
106
107
108
109
110
111
up:
cd ../../../../ && docker-compose up -d
stop:
cd ../../../../ && docker-compose stop
compile:
npm run compile:css
compile-silent:
npm run compile:build
watch:
npm run watch
bundle:
npm run build && npm run bundle
make-pot:
wp i18n make-pot . languages/sunflower.pot \
poedit languages/de_DE.po
//composer make-pot
upload:
rsync --progress ../sunflower.zip sharepic:/var/www/sunflower-theme.de/wp-content/themes/
upload-nightly:
rsync --progress ../sunflower.zip sharepic:/var/www/sunflower-theme.de/updateserver/nightly
activate:
ssh sharepic "cd /var/www/sunflower-theme.de/wp-content/themes/ && wp theme install sunflower.zip --force"
deploy:
git push && make compile-silent bundle upload activate
deploy-nightly:
make compile-silent bundle upload-nightly
deploy-server-only:
make bundle upload activate
childtheme-deploy:
rsync ../sunflower-child.zip sharepic:/var/www/sunflower-theme.de/updateserver/
publish:
@echo "Latest tag was: "
@git describe --tags --abbrev=0
@read -p "which version do you want to publish now (start with number, NO v): " newversion; \
sed -i "s/Version.*/Version:\ $$newversion/" "sass/style.scss" && \
php create-changelog.php $$newversion && \
git checkout -B deploy && \
git add sass/style.scss changelog.html && git commit -m "publishing version $$newversion" && \
git push --set-upstream origin deploy
# git tag "v$$newversion"
# git push && git push --tags
mkdocs-serve:
cd mkdocs && mkdocs serve
mkdocs-build:
cd mkdocs && mkdocs build
mkdocs-deploy:
cd mkdocs && mkdocs build && rsync -r --delete ../documentation/ sharepic:/var/www/sunflower-theme.de/documentation/
js:
npm run build
js-watch:
npm run start
remote-create-dump:
#echo geht nicht wegen nested command zur tabellenauswahl
#ssh sharepic "cd /var/www/sunflower-theme.de/dumps && mysqldump wordpress $(mysql wordpress -Bse "show tables like tr_6__%;") > demo.sql"
#tr_6_commentmeta tr_6_comments tr_6_links tr_6_options tr_6_postmeta tr_6_posts tr_6_term_relationships tr_6_term_taxonomy tr_6_termmeta tr_6_terms
#ssh sharepic "cd /var/www/sunflower-theme.de/dumps && mysqldump wordpress tr_6_commentmeta tr_6_comments tr_6_links tr_6_options tr_6_postmeta tr_6_posts tr_6_term_relationships tr_6_term_taxonomy tr_6_termmeta tr_6_terms > demo.sql"
remote-demo2test:
ssh sharepic "cd /var/www/sunflower-theme.de/dumps && mysqldump sunflower tr_6_commentmeta tr_6_comments tr_6_links tr_6_options tr_6_postmeta tr_6_posts tr_6_term_relationships tr_6_term_taxonomy tr_6_termmeta tr_6_terms > demo2test.sql && sed -i 's/tr_6/tr_7/g' demo2test.sql && sed -i 's/\/demo/\/test/g' demo2test.sql && mysql sunflower < demo2test.sql && cd /var/www/sunflower-theme.de/wp-content/uploads/sites && rsync -av 6/ 7"
sync-shared:
rsync -av sharepic:/var/www/sunflower-theme.de/wp-content/uploads/sites/6/ ../../uploads/sites/2
sync-db:
ssh sharepic "cd /var/www/sunflower-theme.de/dumps && mysqldump sunflower tr_6_commentmeta tr_6_comments tr_6_links tr_6_options tr_6_postmeta tr_6_posts tr_6_term_relationships tr_6_term_taxonomy tr_6_termmeta tr_6_terms > demo.sql" && \
cd ../../../../ && \
rsync sharepic:/var/www/sunflower-theme.de/dumps/demo.sql demo.sql && \
sed -i 's/tr_6/tr_2/g' demo.sql && \
sed -i 's/sites\/6/sites\/2/g' demo.sql && \
sed -i 's/https:\/\/sunflower-theme.de/http:\/\/wordpress/g' demo.sql && \
docker-compose exec -T db mysql wordpress < demo.sql
# in db-container: nano /root/.mycnf -> [client] \n password="somewordpress"
remote-create-homepage-txt:
ssh sharepic "cd /var/www/sunflower-theme.de/dumps && wp post get 37 --url=sunflower-theme.de/demo --field=content > homepage.txt"
changelog:
php create-changelog.php
change-since-last-tag:
git log --pretty=format:"%s" HEAD...$(shell git describe --tags --abbrev=0)
test:
cd ../../../../tests && LOCAL=true MODE=test python3 test.py
test-mobile:
cd ../../../../tests && LOCAL=true MODE=test MOBILE=true python3 test.py
pattern:
cd ../../../../tests && LOCAL=true MODE=pattern python3 test.py && LOCAL=true MODE=patterns MOBILE=true python3 test.py