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: add upgrade command to pixi #614

Merged
merged 8 commits into from
Jan 8, 2024

Conversation

trueleo
Copy link
Contributor

@trueleo trueleo commented Jan 4, 2024

Fixes: #613

Description

Introduce a new 'upgrade' and upgrade-all subcommand to 'pixi'.

Users can specify the target package with the 'package' option and choose upgrade channels using the 'channel' option.

Example

pixi global upgrade <package> --channel <channel>
pixi global upgrade-all  --channel <channel>

@ruben-arts
Copy link
Contributor

Perhaps we could move even more into an fn globally_install_package or whatever the best name would be and the call that function in both the install and upgrade commands. Then we can keep the info for the user as you have done it now. Including the checking if the package is available (which I would indeed make an error).

@trueleo
Copy link
Contributor Author

trueleo commented Jan 5, 2024

@ruben-arts I have made some changes and also added upgrade-all. Please take a look.

Easiest way to add an upgrade command is to reuse the install logic.
This commit extracts out parts of install::execute flow into its own function.
So upgrade is basically just calling install but can format the final message
differently
@trueleo trueleo force-pushed the feat-add-global-upgrade branch from 351eaac to 7e1d9b0 Compare January 8, 2024 06:13
@trueleo trueleo force-pushed the feat-add-global-upgrade branch from 7e1d9b0 to ed442ab Compare January 8, 2024 06:15
@trueleo trueleo marked this pull request as ready for review January 8, 2024 06:28
Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

We approve of the code! Nice work. Could you add documentation to the CLI document?

@trueleo
Copy link
Contributor Author

trueleo commented Jan 8, 2024

We approve of the code! Nice work. Could you add documentation to the CLI document?

@ruben-arts Added to the reference docs. Please take a look

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Thanks, will wait on CI

@wolfv wolfv merged commit e70fd4a into prefix-dev:main Jan 8, 2024
11 checks passed
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.

Add global upgrade and global upgrade-all command
4 participants