From 6bcde16381f6258d9be713998c67c48a99cfd691 Mon Sep 17 00:00:00 2001 From: Kevin Mas Ruiz Date: Thu, 24 Aug 2023 18:24:17 +0200 Subject: [PATCH] chore: update formula path (#1614) --- packages/build/src/homebrew/generate-formula.spec.ts | 2 +- packages/build/src/homebrew/generate-formula.ts | 2 +- packages/build/src/homebrew/update-homebrew-fork.spec.ts | 6 +++--- packages/build/src/homebrew/update-homebrew-fork.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/build/src/homebrew/generate-formula.spec.ts b/packages/build/src/homebrew/generate-formula.spec.ts index fe61f38c7..9f8703891 100644 --- a/packages/build/src/homebrew/generate-formula.spec.ts +++ b/packages/build/src/homebrew/generate-formula.spec.ts @@ -40,7 +40,7 @@ describe('Homebrew generate-formula', function () { beforeEach(function () { getFileContent = sinon.stub(); - getFileContent.withArgs('Formula/mongosh.rb', 'master').resolves({ + getFileContent.withArgs('Formula/m/mongosh.rb', 'master').resolves({ blobSha: 'blobSha', content: VALID_FORMULA, }); diff --git a/packages/build/src/homebrew/generate-formula.ts b/packages/build/src/homebrew/generate-formula.ts index d955eeebb..5c03f28a6 100644 --- a/packages/build/src/homebrew/generate-formula.ts +++ b/packages/build/src/homebrew/generate-formula.ts @@ -7,7 +7,7 @@ export async function generateUpdatedFormula( isDryRun: boolean ): Promise { const currentFormula = await homebrewCore.getFileContent( - 'Formula/mongosh.rb', + 'Formula/m/mongosh.rb', 'master' ); diff --git a/packages/build/src/homebrew/update-homebrew-fork.spec.ts b/packages/build/src/homebrew/update-homebrew-fork.spec.ts index a7c7fb46f..1c556a948 100644 --- a/packages/build/src/homebrew/update-homebrew-fork.spec.ts +++ b/packages/build/src/homebrew/update-homebrew-fork.spec.ts @@ -30,7 +30,7 @@ describe('Homebrew update-homebrew-fork', function () { }); it('writes updated formula and pushes changes', async function () { - getFileContent.rejects().withArgs('Formula/mongosh.rb').resolves({ + getFileContent.rejects().withArgs('Formula/m/mongosh.rb').resolves({ blobSha: 'sha1', content: 'old formula', }); @@ -53,7 +53,7 @@ describe('Homebrew update-homebrew-fork', function () { .withArgs( 'mongosh 1.0.0', 'sha1', - 'Formula/mongosh.rb', + 'Formula/m/mongosh.rb', 'updated formula', 'mongosh-1.0.0-sha' ) @@ -76,7 +76,7 @@ describe('Homebrew update-homebrew-fork', function () { }); it('does not push changes if formula is same', async function () { - getFileContent.rejects().withArgs('Formula/mongosh.rb').resolves({ + getFileContent.rejects().withArgs('Formula/m/mongosh.rb').resolves({ blobSha: 'sha1', content: 'formula', }); diff --git a/packages/build/src/homebrew/update-homebrew-fork.ts b/packages/build/src/homebrew/update-homebrew-fork.ts index 028839021..dca1d23f6 100644 --- a/packages/build/src/homebrew/update-homebrew-fork.ts +++ b/packages/build/src/homebrew/update-homebrew-fork.ts @@ -17,7 +17,7 @@ export async function updateHomebrewFork( params: UpdateHomebrewParameters ): Promise { const branchName = `mongosh-${params.packageVersion}-${params.packageSha}`; - const formulaPath = 'Formula/mongosh.rb'; + const formulaPath = 'Formula/m/mongosh.rb'; const { content: currentContent, blobSha } = await params.homebrewCore.getFileContent(formulaPath, 'master');