From 3aeff58db22fa1960701aaca96ddc07dd35a93ff Mon Sep 17 00:00:00 2001 From: stevethomas Date: Tue, 9 Jun 2026 14:05:57 +1000 Subject: [PATCH] refactor: rename manifest file from yolo.yml to yolo-alpha.yml Move the manifest to yolo-alpha.yml as the permanent name, with no backwards-compatible fallback to yolo.yml. The rename flows from the single source of truth in Helpers::manifestName(); the init stub, tests, error messages, and docs are updated to match. InitCommand now writes via Paths::manifest() instead of a hardcoded filename. Co-Authored-By: Claude Opus 4.8 (1M context) --- CLAUDE.md | 2 +- README.md | 10 +++++----- docs/guide/getting-started.md | 4 ++-- docs/guide/images.md | 2 +- docs/reference/commands.md | 2 +- docs/reference/manifest.md | 2 +- src/Commands/Command.php | 2 +- src/Commands/InitCommand.php | 10 +++++----- src/Helpers.php | 2 +- src/Steps/Network/SyncEc2SecurityGroupStep.php | 2 +- src/Steps/Network/SyncKeyPairStep.php | 2 +- stubs/{yolo.yml.stub => yolo-alpha.yml.stub} | 0 tests/Pest.php | 6 +++--- tests/Unit/PathsTest.php | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) rename stubs/{yolo.yml.stub => yolo-alpha.yml.stub} (100%) diff --git a/CLAUDE.md b/CLAUDE.md index 0e2741e..3a859f0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -78,7 +78,7 @@ Traits for AWS service interactions: `UsesEc2`, `UsesIam`, `UsesAutoscaling`, `U ### Configuration -- `Manifest.php` - Reads/writes `yolo.yml` configuration +- `Manifest.php` - Reads/writes `yolo-alpha.yml` configuration - `Paths.php` - Centralizes file path resolution - `Helpers.php` - Utility functions and container access diff --git a/README.md b/README.md index facbce4..6e1aca3 100644 --- a/README.md +++ b/README.md @@ -131,11 +131,11 @@ Run `yolo-alpha` to see the available commands. Next, run `yolo-alpha init`. The init command does the following: -1. initialises the yolo.yml file in the app with a boilerplate production environment +1. initialises the yolo-alpha.yml file in the app with a boilerplate production environment 2. adds some entries to `.gitignore` 3. prompts for a few bits of information to setup the manifest file -After initialising, you can customise the `yolo.yml` manifest file to suit your app's requirements. +After initialising, you can customise the `yolo-alpha.yml` manifest file to suit your app's requirements. ## Step 2: Provision resources @@ -188,7 +188,7 @@ existing stage is recommended for minor changes. | Update EC2 instance profile | update | | Update AMI | create | -When creating a new stage, the yolo.yml manifest will also be updated to point to the new autoscaling groups on the next +When creating a new stage, the yolo-alpha.yml manifest will also be updated to point to the new autoscaling groups on the next deployment. > [!NOTE] @@ -218,9 +218,9 @@ Builds can be deployed with `yolo-alpha deploy `. > [!TIP] > You can also build and deploy in a single command with `yolo-alpha deploy `. -## yolo.yml +## yolo-alpha.yml -This is a complete yolo.yml manifest file, showing default values where applicable. +This is a complete yolo-alpha.yml manifest file, showing default values where applicable. Note that some keys below are intentionally omitted from the stub generated by `yolo-alpha init`. diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index f51f7ab..0745a40 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -23,11 +23,11 @@ Run `yolo-alpha` to see all available commands. Run `yolo-alpha init` to set up your project. This will: -1. Create a `yolo.yml` manifest with a boilerplate production environment +1. Create a `yolo-alpha.yml` manifest with a boilerplate production environment 2. Add entries to `.gitignore` 3. Prompt for initial configuration values -After initialising, customise the `yolo.yml` manifest to suit your application. +After initialising, customise the `yolo-alpha.yml` manifest to suit your application. ## AWS Authentication diff --git a/docs/guide/images.md b/docs/guide/images.md index 802954d..f37fdff 100644 --- a/docs/guide/images.md +++ b/docs/guide/images.md @@ -29,7 +29,7 @@ This interactive command walks you through updating or replacing the current sta | Update EC2 instance profile | Update | | Update AMI | Create | -When creating a new stage, the `yolo.yml` manifest is updated to point to the new autoscaling groups on the next deployment. +When creating a new stage, the `yolo-alpha.yml` manifest is updated to point to the new autoscaling groups on the next deployment. ::: tip Rotating in a new image has no impact on existing traffic until the updated manifest is deployed. The previous deployment continues serving requests and autoscaling as normal. diff --git a/docs/reference/commands.md b/docs/reference/commands.md index 25e469d..bbdf9ac 100644 --- a/docs/reference/commands.md +++ b/docs/reference/commands.md @@ -4,7 +4,7 @@ | Command | Description | |---|---| -| `init` | Initialise `yolo.yml` manifest | +| `init` | Initialise `yolo-alpha.yml` manifest | | `build ` | Prepare application for deployment | | `deploy ` | Build and deploy to AWS | | `deploy:status ` | Track in-progress deployments | diff --git a/docs/reference/manifest.md b/docs/reference/manifest.md index 9b5adfc..e0a1c42 100644 --- a/docs/reference/manifest.md +++ b/docs/reference/manifest.md @@ -1,6 +1,6 @@ # Manifest -The `yolo.yml` file is the single source of truth for your application's infrastructure configuration. +The `yolo-alpha.yml` file is the single source of truth for your application's infrastructure configuration. ## Complete Reference diff --git a/src/Commands/Command.php b/src/Commands/Command.php index 66ba868..29b9323 100644 --- a/src/Commands/Command.php +++ b/src/Commands/Command.php @@ -45,7 +45,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if (! Manifest::exists()) { - error("Could not find yolo.yml manifest in the current directory - run 'yolo init' to create one"); + error("Could not find yolo-alpha.yml manifest in the current directory - run 'yolo init' to create one"); return 1; } diff --git a/src/Commands/InitCommand.php b/src/Commands/InitCommand.php index 8a97795..3383cb3 100644 --- a/src/Commands/InitCommand.php +++ b/src/Commands/InitCommand.php @@ -16,18 +16,18 @@ protected function configure(): void { $this ->setName('init') - ->setDescription('Create the yolo.yml manifest in the current app root'); + ->setDescription('Create the yolo-alpha.yml manifest in the current app root'); } public function handle(): void { if (Manifest::exists()) { - if (! confirm('A yolo.yml manifest already exists in the current directory. Do you want to overwrite it?', default: false)) { + if (! confirm('A yolo-alpha.yml manifest already exists in the current directory. Do you want to overwrite it?', default: false)) { return; } } - intro('Initialising yolo.yml'); + intro('Initialising yolo-alpha.yml'); $this->gitIgnoreFilesAndDirectories(); $this->initialiseManifest(); @@ -39,7 +39,7 @@ public function handle(): void protected function initialiseManifest(): void { file_put_contents( - Paths::base('yolo.yml'), + Paths::manifest(), str_replace( search: [ '{NAME}', @@ -51,7 +51,7 @@ protected function initialiseManifest(): void text('What is the account ID of the AWS account you want to deploy to?'), text('Which AWS region do you want to deploy to?', default: env('AWS_DEFAULT_REGION', 'ap-southeast-2')), ], - subject: file_get_contents(Paths::stubs('yolo.yml.stub')) + subject: file_get_contents(Paths::stubs('yolo-alpha.yml.stub')) ) ); diff --git a/src/Helpers.php b/src/Helpers.php index 0a70328..ce8faa8 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -49,7 +49,7 @@ public static function keyedResourceName(string|BackedEnum|null $name = null, $e public static function manifestName(): string { - return 'yolo.yml'; + return 'yolo-alpha.yml'; } public static function versionName(): string diff --git a/src/Steps/Network/SyncEc2SecurityGroupStep.php b/src/Steps/Network/SyncEc2SecurityGroupStep.php index 62c0d47..1edb3a0 100644 --- a/src/Steps/Network/SyncEc2SecurityGroupStep.php +++ b/src/Steps/Network/SyncEc2SecurityGroupStep.php @@ -88,7 +88,7 @@ public function __invoke(array $options): StepResult } catch (ResourceDoesNotExistException) { if (! Arr::get($options, 'dry-run')) { if (Manifest::get('aws.ec2.security-group')) { - throw IntegrityCheckException::make('yolo.yml specifies a custom EC2 security group which does not exist'); + throw IntegrityCheckException::make('yolo-alpha.yml specifies a custom EC2 security group which does not exist'); } $name = Helpers::keyedResourceName(SecurityGroup::EC2_SECURITY_GROUP, exclusive: false); diff --git a/src/Steps/Network/SyncKeyPairStep.php b/src/Steps/Network/SyncKeyPairStep.php index 67e4b63..53d0328 100644 --- a/src/Steps/Network/SyncKeyPairStep.php +++ b/src/Steps/Network/SyncKeyPairStep.php @@ -29,7 +29,7 @@ public function __invoke(array $options, Command $command): StepResult } catch (ResourceDoesNotExistException $e) { if (! Arr::get($options, 'dry-run')) { if (Manifest::get('aws.ec2.key-pair')) { - throw IntegrityCheckException::make('yolo.yml specifies a custom EC2 key pair which does not exist'); + throw IntegrityCheckException::make('yolo-alpha.yml specifies a custom EC2 key pair which does not exist'); } $name = Manifest::get('aws.ec2.key-pair', Helpers::keyedResourceName(exclusive: false)); diff --git a/stubs/yolo.yml.stub b/stubs/yolo-alpha.yml.stub similarity index 100% rename from stubs/yolo.yml.stub rename to stubs/yolo-alpha.yml.stub diff --git a/tests/Pest.php b/tests/Pest.php index cf0b9f9..92bcfd7 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -23,7 +23,7 @@ | | Set up a temporary manifest and environment so tests can use Manifest, | Helpers::keyedResourceName(), and other static helpers without touching -| a real yolo.yml or AWS. +| a real yolo-alpha.yml or AWS. | */ @@ -35,7 +35,7 @@ define('BASE_PATH', $tempDir); } -file_put_contents($tempDir . '/yolo.yml', Yaml::dump([ +file_put_contents($tempDir . '/yolo-alpha.yml', Yaml::dump([ 'name' => 'my-app', 'environments' => [ 'testing' => [], @@ -57,7 +57,7 @@ function writeManifest(array $config, string $environment = 'testing'): void { - file_put_contents(BASE_PATH . '/yolo.yml', Yaml::dump([ + file_put_contents(BASE_PATH . '/yolo-alpha.yml', Yaml::dump([ 'name' => 'my-app', 'environments' => [ $environment => $config, diff --git a/tests/Unit/PathsTest.php b/tests/Unit/PathsTest.php index cd3f7d7..56f8c94 100644 --- a/tests/Unit/PathsTest.php +++ b/tests/Unit/PathsTest.php @@ -19,7 +19,7 @@ }); it('resolves manifest path', function () { - expect(Paths::manifest())->toBe(BASE_PATH . '/yolo.yml'); + expect(Paths::manifest())->toBe(BASE_PATH . '/yolo-alpha.yml'); }); it('resolves artefact path', function () {