diff --git a/deploy.yaml b/deploy.yaml deleted file mode 100644 index fc261543..00000000 --- a/deploy.yaml +++ /dev/null @@ -1,21 +0,0 @@ -import: - - src/Support/update_banner.php - - src/Support/update_manifest.php - -hosts: - deployer.org: - remote_user: anton - -config: - banner: | - ╭────────────────────────────────────────────╮ - │ │ - │ Update available! More info at │ - │ https://ï.at/deployer-releases │ - │ │ - ╰────────────────────────────────────────────╯ - -tasks: - release: - - update_banner - - update_manifest diff --git a/src/Support/update_banner.php b/src/Support/update_banner.php deleted file mode 100644 index b15f1b0f..00000000 --- a/src/Support/update_banner.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -task('update_banner', function () { - $skipCurrentVersion = get('version'); - $manifestPath = '~/deployer.org/artifacts/manifest.json'; - $manifest = json_decode(run("cat $manifestPath"), true); - $commands = ''; - foreach ($manifest as $m) { - if ($skipCurrentVersion === $m['version']) { - continue; - } - $commands .= "echo -n '{{banner}}' > ~/deployer.org/check-updates/{$m['version']};\n"; - } - run($commands); -}); diff --git a/src/Support/update_manifest.php b/src/Support/update_manifest.php deleted file mode 100644 index 43035979..00000000 --- a/src/Support/update_manifest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Deployer; - -task('update_manifest', function () { - $version = get('version'); - $manifestPath = '~/deployer.org/artifacts/manifest.json'; - $manifest = json_decode(run("cat $manifestPath"), true); - - $newPharManifest = [ - 'name' => 'deployer.phar', - 'sha1' => get('sha1'), - 'url' => "https://github.com/deployphp/deployer/releases/download/v$version/deployer.phar", - 'version' => $version, - ]; - - // Check if this version already in manifest.json. - $alreadyExistVersion = null; - foreach ($manifest as $i => $m) { - if ($m['version'] === $version) { - $alreadyExistVersion = $i; - } - } - - // Save or update. - if (empty($alreadyExistVersion)) { - $manifest[] = $newPharManifest; - } else { - $manifest[$alreadyExistVersion] = $newPharManifest; - } - - // Write manifest to manifest.json. - $content = json_encode($manifest, JSON_PRETTY_PRINT); - run("echo '$content' > $manifestPath"); -});