mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Fix packaging process
This commit is contained in:
parent
9eabfd0f27
commit
2ccfb1fd33
1 changed files with 6 additions and 8 deletions
12
RoboFile.php
12
RoboFile.php
|
@ -186,9 +186,7 @@ class RoboFile extends \Robo\Tasks {
|
||||||
// perform Composer installation in the temp location with dev dependencies
|
// perform Composer installation in the temp location with dev dependencies
|
||||||
$t->addTask($this->taskComposerInstall()->arg("-q")->dir($dir));
|
$t->addTask($this->taskComposerInstall()->arg("-q")->dir($dir));
|
||||||
// generate the manual
|
// generate the manual
|
||||||
$t->addCode(function() {
|
$t->addTask($this->taskExec("./robo manual -q")->dir($dir));
|
||||||
return $this->manual(["-q"]);
|
|
||||||
});
|
|
||||||
// perform Composer installation in the temp location for final output
|
// perform Composer installation in the temp location for final output
|
||||||
$t->addTask($this->taskComposerInstall()->dir($dir)->noDev()->optimizeAutoloader()->arg("--no-scripts")->arg("-q"));
|
$t->addTask($this->taskComposerInstall()->dir($dir)->noDev()->optimizeAutoloader()->arg("--no-scripts")->arg("-q"));
|
||||||
// delete unwanted files
|
// delete unwanted files
|
||||||
|
@ -231,7 +229,7 @@ class RoboFile extends \Robo\Tasks {
|
||||||
|
|
||||||
/** Packages a release tarball into an Arch package */
|
/** Packages a release tarball into an Arch package */
|
||||||
public function packageArch(string $tarball): Result {
|
public function packageArch(string $tarball): Result {
|
||||||
$dir = dirname($tarball);
|
$dir = dirname($tarball).\DIRECTORY_SEPARATOR;
|
||||||
// start a collection
|
// start a collection
|
||||||
$t = $this->collectionBuilder();
|
$t = $this->collectionBuilder();
|
||||||
// extract the PKGBUILD from the tarball
|
// extract the PKGBUILD from the tarball
|
||||||
|
@ -239,10 +237,10 @@ class RoboFile extends \Robo\Tasks {
|
||||||
// because Robo doesn't support extracting a single file we have to do it ourselves
|
// because Robo doesn't support extracting a single file we have to do it ourselves
|
||||||
(new \Archive_Tar($tarball))->extractList("arsse/dist/arch/PKGBUILD", $dir, "arsse/dist/arch/", false);
|
(new \Archive_Tar($tarball))->extractList("arsse/dist/arch/PKGBUILD", $dir, "arsse/dist/arch/", false);
|
||||||
// perform a do-nothing filesystem operation since we need a Robo task result
|
// perform a do-nothing filesystem operation since we need a Robo task result
|
||||||
return $this->taskFilesystemStack()->chmod("PKGBUILD", 0644)->dir($dir)->run();
|
return $this->taskFilesystemStack()->chmod($dir."PKGBUILD", 0644)->run();
|
||||||
})->completion($this->taskFilesystemStack()->remove("PKGBUILD")->dir($dir));
|
})->completion($this->taskFilesystemStack()->remove($dir."PKGBUILD"));
|
||||||
// build the package
|
// build the package
|
||||||
$t->taskExec("makepkg -Ccf")->dir($dir);
|
$t->addTask($this->taskExec("makepkg -Ccf")->dir($dir));
|
||||||
return $t->run();
|
return $t->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue