This repository was archived by the owner on Nov 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +43
-48
lines changed
Expand file tree Collapse file tree 2 files changed +43
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #
2+ # NOTE TO OTHERS:
3+ #
4+ # You don't need to use this script, it is what I use to help me
5+ # create a plugin zip file that I upload to Github releases.
6+
7+
8+ # NOTE TO FUTURE SELF:
9+ #
10+ # I copy each file individually to be sure only what I want goes in
11+ # the plugin. For example a index.js.map file gets created during
12+ # development which is not needed in production.
13+
14+ # SVN repository update for wp.org uses Github actions
15+
16+ VERSION := ` jq -r " .version" package.json `
17+
18+ # TODO: add check package.json version and PHP plugin version match
19+ #
20+ clean :
21+ rm -rf dist/
22+
23+ install :
24+ npm install
25+
26+ # Clean production build
27+ build : install
28+ npm run build
29+
30+ zip : clean build
31+ mkdir -p dist/ code-syntax-block/ assets
32+ mkdir -p dist/ code-syntax-block/ build
33+ cp -r assets/ prism dist/ code-syntax-block/ assets/
34+ cp assets/ *.css dist/ code-syntax-block/ assets
35+ cp build/ index.js dist/ code-syntax-block/ build/
36+ cp build/ index.asset.php dist/ code-syntax-block/ build/
37+ cp index.php dist/ code-syntax-block/
38+ cp settings.php dist/ code-syntax-block/
39+ cp prism-languages.php dist/ code-syntax-block/
40+ cp readme.md dist/ code-syntax-block/
41+ cp readme.txt dist/ code-syntax-block/
42+ cd dist && zip -r code-syntax-block-{{ VERSION}} .zip . -i " code-syntax-block/*"
43+
You can’t perform that action at this time.
0 commit comments