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

Fix handling of release option #35

Merged
merged 1 commit into from
May 6, 2024
Merged

Fix handling of release option #35

merged 1 commit into from
May 6, 2024

Conversation

dannymcgee
Copy link
Contributor

@dannymcgee dannymcgee commented May 6, 2024

Previously, the generators had been creating project configurations that looked like this:

{
  // ...
  "targets": {
    "build": {
      "executor": "@nxrs/cargo:build",
      "options": {
        "release": false
      },
      "configurations": {
        "production": {
          "release": true
        }
      }
    }
// ...

The release option was passed straight through to Cargo as a command line argument, but Cargo's --release flag is just an alias for --profile release, and passing --release false would cause Cargo to fail.

This update changes the default generated project configurations to use --profile dev by default and --profile release for production, and updates the argument parsing logic to handle the release option without erroring when it is present.

@dannymcgee dannymcgee merged commit 867587b into main May 6, 2024
@dannymcgee dannymcgee deleted the fix-release-false branch May 6, 2024 00:02
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.

1 participant