-
Notifications
You must be signed in to change notification settings - Fork 76
chore: publish to homebrew from CI MONGOSH-502 #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a8b70e3
to
c326261
Compare
...this.repo, | ||
pull_number: prNumber | ||
}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does whichever github user is running in CI have merge permissions for the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great question, i don't think so, and i actually have no clue who we should ask, going to ask Jess, probably she knows
packages/build/src/homebrew/utils.ts
Outdated
}); | ||
} | ||
|
||
export function cloneRepository(cloneDir: string, repositoryUrl: string): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, good point - needs cleaning up!
@@ -81,6 +82,7 @@ export default async function release( | |||
} | |||
await fs.writeFile(path.join(config.outputDir, '.artifact_metadata'), JSON.stringify(tarballFile)); | |||
} else if (command === 'upload') { | |||
const barque = new Barque(config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -17,11 +17,15 @@ chai.use(chaiAsPromised); | |||
// to wait for these to finish. | |||
const tick = promisify(setImmediate); | |||
|
|||
// We keep an additional index as we might create two temp directories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one confuses me :), is this related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was... when I created git repos locally in tests I got conflicts as new Date()
was not sufficient to create a unique folder name. I've left it in as it would prevent the same issue in the future.
I don't need it right now anymore so I can remove if you say we should strip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fwiw, we do use Math.random()
in a few other places as well. Doing that here would sound good to me in terms of consistency 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Or, to be clear, leaving it in this PR is also just fine with me!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice stuff!
Quick update: I've tested the Github Repo auto-commit/pr/merge behavior, fixed some issues, and it's operational now. Here's a PR that was created with the |
This adds publishing to homebrew to the
build
package as part of thepublish
command.Publishing to our https://github.com/mongodb/homebrew-brew repository is done by:
homebrew-brew
repository locallyhomebrew-brew
homebrew-brew
from our new branch to masterI'd suggest waiting with this PR until #535 has landed, then rebase on top and merge since homebrew publishing requires the NPM packages to be released already.(PR has landed)