-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·50 lines (44 loc) · 919 Bytes
/
build.sh
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
#!/bin/bash
echo "Building production version of plugin..."
rm -rf ../wp-typeit-build
npm install
npm run build
rm -rf node_modules
mkdir -p ../wp-typeit-build/wp-typeit
cp -a ./ ../wp-typeit-build/wp-typeit
FILES_TO_DELETE=(
"tests"
".git"
".gitignore"
"build.sh"
"package-lock.json"
"package.json"
"webpack.config.js"
"src/scss"
"src/block"
"README.md"
"phpunit.xml"
"phpcs.xml.dist"
"composer.json"
"composer.lock"
"plugin-assets"
".prettierignore"
".eslintrc.js"
".eslintignore"
".eslintcache"
".husky"
"empty.ts"
"tsconfig.json"
".tool-versions"
)
for item in "${FILES_TO_DELETE[@]}"
do
path_to_delete="../wp-typeit-build/wp-typeit/$item"
echo "Deleting $path_to_delete"
rm -rf $path_to_delete
done
cd ../wp-typeit-build
echo "Zipping..."
zip -r "wp-typeit.zip" ./wp-typeit
cd ../wp-typeit
echo "Done!"