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

Bevy build #102

Merged
merged 7 commits into from
Sep 29, 2024
Merged

Bevy build #102

merged 7 commits into from
Sep 29, 2024

Conversation

TimJentzsch
Copy link
Collaborator

This PR adds the remaining pieces needed for the bevy build command.

The command is a wrapper around cargo build, but with an additional web sub command which makes it a lot easier to build an app for the browser.
I also plan to add additional features in the feature, like #68.

The PR contains the following changes:

  • Added cargo install wrapper to install a program if it's missing (prompting the user).
  • Added helper to obtain the current package name via Cargo.toml. There are likely better ways to do this (perhaps via cargo metadata), but I already had this implemented and we can improve it in a follow-up if needed.
  • Added helper to determine the active compilation profile, which is needed to determine the path to the build artifact.
  • Implemented the build command itself.

If you'd prefer smaller PRs let me know and I will split this up further.

@BD103 BD103 added A-CI Related to CI and GitHub Actions C-Feature Make something new possible labels Sep 25, 2024
@TimJentzsch TimJentzsch added A-CLI Related to the main CLI and not a more specific subcommand and removed A-CI Related to CI and GitHub Actions labels Sep 26, 2024
Cargo.toml Outdated Show resolved Hide resolved
src/bin/main.rs Outdated Show resolved Hide resolved
src/build/mod.rs Outdated Show resolved Hide resolved
src/build/mod.rs Outdated Show resolved Hide resolved
src/external_cli/cargo/mod.rs Outdated Show resolved Hide resolved
@BD103
Copy link
Member

BD103 commented Sep 27, 2024

In general, this change looks good! I love how easy dialoguer is to work with when prompting about installation.

I have a few comments and there are some merge conflicts, but then it's good to go!

@@ -1,3 +1,4 @@
#![expect(dead_code, reason = "Will be used for bevy bump and perhaps bevy run")]
Copy link
Collaborator Author

@TimJentzsch TimJentzsch Sep 28, 2024

Choose a reason for hiding this comment

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

Not sure why this lint wasn't emitted before...

Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

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

Looks good! Merge it when you feel like it's ready :)

@TimJentzsch TimJentzsch merged commit 5cd2719 into main Sep 29, 2024
6 checks passed
@TimJentzsch TimJentzsch deleted the bevy-build branch September 29, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants