1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Fix packaging process

This commit is contained in:
J. King 2021-05-23 22:03:47 -04:00
parent 9eabfd0f27
commit 2ccfb1fd33

View file

@ -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,18 +229,18 @@ 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
$t->addCode(function() use ($tarball, $dir) { $t->addCode(function() use ($tarball, $dir) {
// 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();
} }