mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Use Robo to extract zip archive
This commit is contained in:
parent
b514ac983b
commit
b3566f8d48
3 changed files with 40 additions and 99 deletions
11
RoboFile.php
11
RoboFile.php
|
@ -208,7 +208,6 @@ class RoboFile extends \Robo\Tasks {
|
|||
// compile the stylesheet
|
||||
$t->taskExec($postcss)->arg($scss)->option("-o", $css);
|
||||
// download highlight.js
|
||||
if (extension_loaded("zip")) {
|
||||
$t->addCode(function() use ($tmp, $themeout) {
|
||||
$languages = ["php", "bash", "shell", "xml", "nginx", "apache"];
|
||||
$post = http_build_query((function($langs) {
|
||||
|
@ -244,13 +243,11 @@ class RoboFile extends \Robo\Tasks {
|
|||
} else {
|
||||
file_put_contents($tmp."highlightjs.zip", $hljs);
|
||||
}
|
||||
$z = new \ZipArchive;
|
||||
$z->open($tmp."highlightjs.zip");
|
||||
$z->extractTo($themeout, "highlight.pack.js");
|
||||
$this->taskExtract($tmp."highlightjs.zip")->to($tmp."hljs")->run();
|
||||
$this->taskFilesystemStack()->copy($tmp."hljs/highlight.pack.js", $themeout."/highlight.pack.js")->run();
|
||||
}, "downloadHighlightjs");
|
||||
} else {
|
||||
$this->say("Zip extension not installed; not updating hightlight.js");
|
||||
}
|
||||
// copy JavaScript files from the Daux theme
|
||||
# TODO
|
||||
// execute the collection
|
||||
return $t->run();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,5 @@
|
|||
"symfony/process": "^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"splitbrain/php-archive": "^1.1"
|
||||
}
|
||||
}
|
||||
|
|
59
vendor-bin/robo/composer.lock
generated
59
vendor-bin/robo/composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "0f7d93d4c470b72b0f6f0bc0317d603f",
|
||||
"content-hash": "d95cf402fed434140db8ae87c3c8bf32",
|
||||
"packages": [
|
||||
{
|
||||
"name": "consolidation/annotated-command",
|
||||
|
@ -1734,62 +1734,7 @@
|
|||
"time": "2019-04-06T14:04:46+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "splitbrain/php-archive",
|
||||
"version": "1.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/splitbrain/php-archive.git",
|
||||
"reference": "10d89013572ba1f4d4ad7fcb74860242f4c3860b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/splitbrain/php-archive/zipball/10d89013572ba1f4d4ad7fcb74860242f4c3860b",
|
||||
"reference": "10d89013572ba1f4d4ad7fcb74860242f4c3860b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-bz2": "*",
|
||||
"ext-zip": "*",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"phpunit/phpunit": "^4.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "Used for proper filename encode handling",
|
||||
"ext-mbstring": "Can be used alternatively for handling filename encoding"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"splitbrain\\PHPArchive\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Andreas Gohr",
|
||||
"email": "andi@splitbrain.org"
|
||||
}
|
||||
],
|
||||
"description": "Pure-PHP implementation to read and write TAR and ZIP archives",
|
||||
"keywords": [
|
||||
"archive",
|
||||
"extract",
|
||||
"tar",
|
||||
"unpack",
|
||||
"unzip",
|
||||
"zip"
|
||||
],
|
||||
"time": "2018-09-09T12:13:53+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
|
|
Loading…
Reference in a new issue