From 378367b65f02a77e7b1eb21fcd4e3f43e2b89531 Mon Sep 17 00:00:00 2001 From: Yash Sahu <54198301+yash30201@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:51:55 +0530 Subject: [PATCH] feat: update VERSION file in php-yoshi repo if it exists (#2228) * feat: Update VERSION file in php-yoshi repo if it exists * test fix * Fix linting --------- Co-authored-by: Jeff Ching --- src/strategies/php-yoshi.ts | 9 +++++++++ test/strategies/php-yoshi.ts | 1 + 2 files changed, 10 insertions(+) diff --git a/src/strategies/php-yoshi.ts b/src/strategies/php-yoshi.ts index 67a675c92..fddf2c203 100644 --- a/src/strategies/php-yoshi.ts +++ b/src/strategies/php-yoshi.ts @@ -250,6 +250,15 @@ export class PHPYoshi extends BaseStrategy { }), }); + // update VERSION file + updates.push({ + path: this.addPath('VERSION'), + createIfMissing: false, + updater: new DefaultUpdater({ + version, + }), + }); + // update the aggregate package information in the root composer.json updates.push({ path: this.addPath('composer.json'), diff --git a/test/strategies/php-yoshi.ts b/test/strategies/php-yoshi.ts index a494fe187..df01cdfbf 100644 --- a/test/strategies/php-yoshi.ts +++ b/test/strategies/php-yoshi.ts @@ -153,6 +153,7 @@ describe('PHPYoshi', () => { const updates = release!.updates; assertHasUpdate(updates, 'CHANGELOG.md', Changelog); assertHasUpdate(updates, 'composer.json', RootComposerUpdatePackages); + assertHasUpdate(updates, 'VERSION', DefaultUpdater); }); it('finds touched components', async () => { const strategy = new PHPYoshi({