Skip to content

Commit 3582e51

Browse files
FEATURE: allow to skip the post-install prunner binary download
1 parent 43cb72b commit 3582e51

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Classes/Composer/InstallerScripts.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ class InstallerScripts
4545

4646
const DEFAULT_VERSION_TO_INSTALL = '1.0.1';
4747

48+
/**
49+
* Downloads the prunner binaries from https://github.com/Flowpack/prunner to ./prunner.
50+
*
51+
* You can pin the prunner version in the composer.json#extra.prunner-version field.
52+
* You can also set it to 'skip-download' to skip the download.
53+
*
54+
* @return void
55+
*/
4856
public static function postUpdateAndInstall()
4957
{
5058
$platform = php_uname('s'); // stuff like Darwin etc
@@ -58,6 +66,10 @@ public static function postUpdateAndInstall()
5866
$version = $extra['prunner-version'];
5967
$versionMessage = ' (OVERRIDDEN in composer.json)';
6068
}
69+
if ($version === 'skip-download') {
70+
echo '> Not downloading prunner (due to "skip-download" instruction in composer.json)';
71+
return;
72+
}
6173

6274
$baseDirectory = 'prunner';
6375
$platformSpecificTargetDirectory = $baseDirectory . '/' . $platform . '_' . $architecture;

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ will be downloaded. However, it is possible to override this via `extra.prunner-
4646
}
4747
```
4848

49+
## Skip the Prunner binary download
50+
51+
In case you want to install Prunner manually,
52+
you can skip the download of the Prunner entirely
53+
by setting `extra.prunner-version` in the root `composer.json` to `"skip-download"`.
54+
55+
```json
56+
{
57+
"extra": {
58+
"prunner-version": "skip-download"
59+
}
60+
}
61+
```
62+
4963
## Building the UI package
5064

5165
In [prunner-ui](https://github.com/Flowpack/prunner-ui), run `yarn build`

0 commit comments

Comments
 (0)