-
Notifications
You must be signed in to change notification settings - Fork 7
/
composer.json
48 lines (48 loc) · 2.01 KB
/
composer.json
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
{
"name": "gambitph/page-builder-sandwich",
"description": "Page Builder Sandwich",
"keywords": ["sandwich", "page builder", "builder", "page", "pb sandwich", "gambit", "wordpress"],
"homepage" : "http://gambit.ph",
"license": "GPLv2+",
"authors": [
{
"name": "Gambit Technologies",
"email" : "[email protected]",
"homepage" : "http://gambit.ph/",
"role" : "Developer"
}
],
"type": "project",
"autoload": {
"files": ["pb-sandwich.php"]
},
"archive": {
"exclude": [
"/bin",
"/vendor",
"/tests",
"*/composer.*",
"/preview",
"*/.*",
"*.dist",
"*.md",
"*.codekit",
"*.rb",
"*.pot",
"*.psd",
"/languages/readme.txt",
"*/_*.js",
"/scss",
"*/_*.scss",
"*.sh",
"*.py",
"phpunit.xml"
]
},
"scripts": {
"post-archive-cmd": [
"php -r \"\\$withVersion = false; \\$finalZip = basename( getcwd() ) . '.zip'; foreach ( array_merge(glob('*.php'), glob('*.css')) as \\$zipFile ) { \\$f = file_get_contents( \\$zipFile ); preg_match('/Plugin Name\\\\s*:\\\\s*([^\\\\n]+)/i', \\$f, \\$matches ); if (count(\\$matches) < 2) { preg_match('/Theme Name\\\\s*:\\\\s*([^\\\\n]+)/i', \\$f, \\$matches ); if (count(\\$matches) < 2) {continue;} } \\$name = \\$matches[1]; \\$zipName = trim(strtolower(str_replace(' ', '-', \\$name))); preg_match('/Version\\\\s*:\\\\s*([^\\\\n]+)/i', \\$f, \\$matches); if ( count(\\$matches) < 2 ){ continue;} \\$version = \\$matches[1]; \\$finalZip = \\$zipName . '-' . \\$version . '.zip'; if ( ! \\$withVersion ) { \\$finalZip = \\$zipName . '.zip'; } } foreach ( glob('*.zip') as \\$zipFile ) { rename( \\$zipFile, \\$finalZip ); break; }\"",
"php -r \"foreach ( glob('*.zip') as \\$zipFile ) { \\$dir = basename(\\$zipFile, '.zip'); exec( 'mkdir _tmp && mv ' . \\$zipFile . ' _tmp && cd _tmp && unzip ' . \\$zipFile . ' -d ' . \\$dir . ' && rm ' . \\$zipFile . ' && zip -r9 ' . \\$zipFile . ' ' . \\$dir . ' && mv *.zip .. && cd .. && rm -R _tmp' ); exec( 'mv ' . \\$zipFile . ' ..' ); } echo 'Created: ' . \\$zipFile . \\\"\\n\\\";\""
]
}
}