mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-10 09:02:45 +08:00
Added docker option for FWest98
Use as: `release.php --docker`
This commit is contained in:
parent
0173d30619
commit
4d0276bb09
1 changed files with 9 additions and 2 deletions
11
release.php
11
release.php
|
@ -7,6 +7,9 @@ if (!$gulp) {
|
|||
exit('gulp not installed, run as root: npm install --global gulp-cli');
|
||||
}
|
||||
|
||||
$options = getopt('', ['docker']);
|
||||
$options['docker'] = isset($options['docker']);
|
||||
|
||||
$package = json_decode(file_get_contents('package.json'));
|
||||
|
||||
$zip_destination = "snappymail-{$package->version}.zip";
|
||||
|
@ -71,7 +74,11 @@ foreach ($files as $file) {
|
|||
}
|
||||
}
|
||||
|
||||
$tar->buildFromDirectory('./snappymail/', "@v/{$package->version}@");
|
||||
if ($options['docker']) {
|
||||
$tar->buildFromDirectory('./snappymail/', "@v/{$package->version}@");
|
||||
} else {
|
||||
$tar->buildFromDirectory('./', "@snappymail/v/{$package->version}@");
|
||||
}
|
||||
|
||||
$zip->addFile('data/.htaccess');
|
||||
$tar->addFile('data/.htaccess');
|
||||
|
@ -122,4 +129,4 @@ if(readline("Build Docker image? (Y/N): ") === "Y") {
|
|||
}
|
||||
|
||||
passthru("{$docker} build " . __DIR__ . "/.docker/release/ --build-arg FILES_ZIP={$zip_destination} -t snappymail:{$package->version}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue