-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpack.sh
More file actions
executable file
·58 lines (42 loc) · 1.71 KB
/
Copy pathpack.sh
File metadata and controls
executable file
·58 lines (42 loc) · 1.71 KB
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
#!/bin/bash
#
# scripts/pack.sh - create the installable plugin zip
#
# GPLv3 License, Copyright (c) 2023 - 2024 Heiko Lübbe
# WordPress-plugin random-quote-zitat-service see https://github.com/muhme/quote_wordpress
#
# packing ZIP archive without version, as WordPress is stupid using ZIP file name as plugin directory name
# -e exit if a command fails
# -u exit when attempting to use an unset variable
# -o pipefail - the pipeline's return status is the value of the last (rightmost) command to exit with a non-zero status
set -euo pipefail
echo '*** Packing plugin'
if [ $# -eq 1 ] && [ "$1" = "full" ]; then
echo '*** i18n-create.sh'
docker exec -it quote_wp_wordpress /var/www/html/wp-content/plugins/random-quote-zitat-service/scripts/i18n-create.sh
echo '*** ncu – node check updates -> ncu -u && npm install'
ncu -e 2
echo '*** npm audit – node package manager audit'
npm audit
echo '*** npm run lint:css – node package manager linting CSS'
npm run lint:css
echo '*** npm run lint:js – node package manager linting JavaScript -> npm run lint:js:fix'
npm run lint:js
echo '*** npm run format – node package manager source code formatting'
npm run format
echo '*** npm run build'
npm run build
echo '*** scripts/compose.sh build'
scripts/compose.sh build
echo '*** scripts/install.sh'
scripts/install.sh
echo '*** scripts/test.sh --workers=2'
scripts/test.sh --workers=2
fi
# to have created date now
rm -f random-quote-zitat-service.zip
# for packing list see https://developer.wordpress.org/plugins/plugin-basics/best-practices/#folder-structure
npm run plugin-zip
# work is done
echo '*** Packed:'
ls -l random-quote-zitat-service.zip