release 0.5
This commit is contained in:
parent
4646e02b82
commit
a68017d3b0
@ -1,5 +1,5 @@
|
||||
0.5 - 2022.11.12
|
||||
- require Dotclear 2.24
|
||||
0.5 - 2022.11.20
|
||||
- fix compatibility with Dotclear 2.24 (required)
|
||||
|
||||
0.4 - 2021.09.02
|
||||
- clean up code
|
||||
|
15
README.md
15
README.md
@ -1,5 +1,12 @@
|
||||
# README
|
||||
|
||||
[![Release](https://img.shields.io/github/v/release/JcDenis/tinyPacker)](https://github.com/JcDenis/tinyPacker/releases)
|
||||
[![Date](https://img.shields.io/github/release-date/JcDenis/tinyPacker)](https://github.com/JcDenis/tinyPacker/releases)
|
||||
[![Issues](https://img.shields.io/github/issues/JcDenis/tinyPacker)](https://github.com/JcDenis/tinyPacker/issues)
|
||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.24-blue.svg)](https://fr.dotclear.org/download)
|
||||
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/tinyPacker)
|
||||
[![License](https://img.shields.io/github/license/JcDenis/tinyPacker)](https://github.com/JcDenis/tinyPacker/blob/master/LICENSE)
|
||||
|
||||
## WHAT IS tinyPacker ?
|
||||
|
||||
_tinyPacker_ is a plugin for the open-source
|
||||
@ -13,7 +20,7 @@ direct from Dotclear blog manager.
|
||||
_tinyPacker_ requires:
|
||||
|
||||
* Super administrator permissions
|
||||
* Dotclear 2.18
|
||||
* Dotclear 2.24
|
||||
* A writable public directory.
|
||||
|
||||
## USAGE
|
||||
@ -30,3 +37,9 @@ and it's pack into current blog public directory.
|
||||
* License : GNU GPL v2
|
||||
* Source & contribution : [GitHub Page](https://github.com/JcDenis/tinyPacker)
|
||||
* Packages & details : [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/tinyPacker)
|
||||
|
||||
## CONTRIBUTORS
|
||||
|
||||
* Jean-Christian Denis
|
||||
|
||||
You are welcome to contribute to this code.
|
27
_admin.php
27
_admin.php
@ -10,7 +10,6 @@
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
return null;
|
||||
}
|
||||
@ -80,10 +79,12 @@ class tinyPacker
|
||||
$id = $modules[0];
|
||||
|
||||
# Repository directory
|
||||
if (($root = self::repositoryDir($list->core)) === false) {
|
||||
if (($root = self::repositoryDir()) === false) {
|
||||
throw new Exception(
|
||||
__('Destination directory is not writable.'
|
||||
));
|
||||
__(
|
||||
'Destination directory is not writable.'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
# Module to pack
|
||||
@ -93,7 +94,7 @@ class tinyPacker
|
||||
$module = $list->modules->getModules($id);
|
||||
|
||||
# Excluded files and dirs
|
||||
$exclude = array(
|
||||
$exclude = [
|
||||
'\.',
|
||||
'\.\.',
|
||||
'__MACOSX',
|
||||
@ -103,24 +104,23 @@ class tinyPacker
|
||||
'CVS',
|
||||
'\.directory',
|
||||
'\.DS_Store',
|
||||
'Thumbs\.db'
|
||||
);
|
||||
'Thumbs\.db',
|
||||
];
|
||||
|
||||
# Packages names
|
||||
$files = array(
|
||||
$files = [
|
||||
$type . '-' . $id . '.zip',
|
||||
$type . '-' . $id . '-' . $module['version'] . '.zip'
|
||||
);
|
||||
$type . '-' . $id . '-' . $module['version'] . '.zip',
|
||||
];
|
||||
|
||||
# Create zip
|
||||
foreach ($files as $f) {
|
||||
|
||||
@set_time_limit(300);
|
||||
$fp = fopen($root . '/' . $f, 'wb');
|
||||
|
||||
$zip = new fileZip($fp);
|
||||
|
||||
foreach($exclude AS $e) {
|
||||
foreach ($exclude as $e) {
|
||||
$zip->addExclusion(sprintf(
|
||||
'#(^|/)(%s)(/|$)#',
|
||||
$e
|
||||
@ -155,11 +155,10 @@ class tinyPacker
|
||||
files::makeDir($dir, true);
|
||||
}
|
||||
if (is_writable($dir)) {
|
||||
|
||||
return $dir;
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
catch(Exception $e) {}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -10,7 +10,6 @@
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
@ -26,6 +25,6 @@ $this->registerModule(
|
||||
'type' => 'plugin',
|
||||
'support' => 'https://github.com/JcDenis/tinyPacker',
|
||||
'details' => 'https://plugins.dotaddict.org/dc2/details/tinyPacker',
|
||||
'repository' => 'https://raw.githubudsfsfdsfsercontent.com/JcDenis/tinyPacker/master/dcstore.xml'
|
||||
'repository' => 'https://raw.githubudsfsfdsfsercontent.com/JcDenis/tinyPacker/master/dcstore.xml',
|
||||
]
|
||||
);
|
@ -1,10 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="tinyPacker">
|
||||
<name>Tiny packer</name>
|
||||
<version>0.4</version>
|
||||
<version>0.5</version>
|
||||
<author>Jean-Christian Denis</author>
|
||||
<desc>Quick pack theme or plugin into public dir</desc>
|
||||
<file>https://github.com/JcDenis/tinyPacker/releases/download/v0.4/plugin-tinyPacker.zip</file>
|
||||
<file>https://github.com/JcDenis/tinyPacker/releases/download/v0.5/plugin-tinyPacker.zip</file>
|
||||
<da:dcmin>2.24</da:dcmin>
|
||||
<da:details>https://plugins.dotaddict.org/dc2/details/tinyPacker</da:details>
|
||||
<da:support>https://github.com/JcDenis/tinyPacker</da:support>
|
||||
</module>
|
||||
|
Loading…
Reference in New Issue
Block a user