Skip to content

[package outputs] add --outputs flag to devbox add, and save in config #1707

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

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

savil
Copy link
Collaborator

@savil savil commented Jan 9, 2024

Summary

Enables devbox add <package-name> --outputs <output-name> to add an outputs field to the config for that package.

The next PR will hook up reading this outputs field from the config, and changing how we generate the flake.nix to match this outputs field.

How was it tested?

augmented unit tests

> devbox add prometheus --outputs out,cli
Info: Adding package "prometheus@latest" to devbox.json
Info: Added outputs out, cli to package prometheus@latest



> git diff devbox.json
diff --git a/devbox.json b/devbox.json
index 224072bc..f1a0c59c 100644
--- a/devbox.json
+++ b/devbox.json
@@ -3,6 +3,10 @@
     "go":                          "latest",
     "runx:golangci/golangci-lint": "latest",
     "runx:mvdan/gofumpt":          "latest",
+    "prometheus": {
+      "version": "latest",
+      "outputs": ["out", "cli"],
+    },
   },
   "env": {
     "GOENV": "off",

Copy link
Collaborator Author

savil commented Jan 9, 2024

@savil savil requested a review from gcurtis January 9, 2024 00:17
@savil savil marked this pull request as ready for review January 9, 2024 00:17
@savil
Copy link
Collaborator Author

savil commented Jan 11, 2024

@gcurtis ping

@savil savil force-pushed the savil/package-outputs-1 branch from 373895c to 4d73d2c Compare January 11, 2024 23:20
@savil savil merged commit 1a41adf into main Jan 12, 2024
@savil savil deleted the savil/package-outputs-1 branch January 12, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants