Skip to content
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

feat: pkg.pr.new #313

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Aslemammad
Copy link
Contributor

@Aslemammad Aslemammad commented Jun 12, 2024

Whenever the commit is available, we avoid building vite and we use pkg.pr.new directly.

The idea is to get the commit sha from the vite repo when commenting in the workflow dispatch (commit option which is optional).

@@ -25,16 +25,19 @@ cli
.action(async (suites, options: CommandOptions) => {
const { root, vitePath, workspace } = await setupEnvironment()
const suitesToRun = getSuitesToRun(suites, root)
let viteMajor
let viteMajor = 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a test, i wonder how we should get the viteMajor when we do not have the vite repo since we didn't set it up in commit mode.

} else {
viteMajor = parseMajorVersion(options.release)
}
const runOptions: RunOptions = {
root,
viteCommit: options.commit,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

viteCommit option for later in the test so we generate a tarball link from it.

@@ -17,7 +17,7 @@ export async function test(options: RunOptions) {
)
}
pkg.scripts.selftestscript =
"[ -d ../../vite/packages/vite/dist ] || (echo 'vite build failed' && exit 1)"
"pnpm vite -v || (echo 'vite build failed' && exit 1)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a test too, since we do not have the repo anymore in commit mode, i just tried logging the vite version.

I think there should be a condition here.

@dominikg
Copy link
Collaborator

The name commit is a bit generic and we already support passing a commit on the vite main repo.

I think the release option could be extended to support links to this registry, or introduce a similar option that has an explicit name.

But this should probably stay as a draft until we figured out how it works with the planned comment triggers in vite repo.

@Aslemammad
Copy link
Contributor Author

Yes, agreed! Let's handle things with the release field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants