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

coffee: fix the upgrade commands #228

Merged
merged 5 commits into from
Feb 6, 2024
Merged

Conversation

vincenzopalazzo
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo commented Feb 4, 2024

I was on a plane and I found the time to write a PoC for better upgrade commands, this also introduced a simplification of the code

Fixes #223
Fixes #214

Copy link

netlify bot commented Feb 4, 2024

Deploy Preview for coffee-docs canceled.

Name Link
🔨 Latest commit 53d05f6
🔍 Latest deploy log https://app.netlify.com/sites/coffee-docs/deploys/65c2210fd0eabb000854c697

@vincenzopalazzo vincenzopalazzo added this to the 0.1-rc1 milestone Feb 4, 2024
@vincenzopalazzo vincenzopalazzo marked this pull request as ready for review February 4, 2024 15:15
@vincenzopalazzo vincenzopalazzo changed the title Macros/upgrade command fix coffee: fix the upgrade commands Feb 4, 2024
Copy link
Collaborator

@tareknaser tareknaser left a comment

Choose a reason for hiding this comment

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

Great job!
Left some comments.

Let's also remove this function because coffee upgrade should upgrade a whole repository not a single plugin as per our discussion

coffee_lib/src/types/mod.rs Outdated Show resolved Hide resolved
coffee_github/src/repository.rs Outdated Show resolved Hide resolved
coffee_github/src/repository.rs Outdated Show resolved Hide resolved
coffee_github/src/utils.rs Outdated Show resolved Hide resolved
coffee_lib/src/types/mod.rs Show resolved Hide resolved
coffee_github/src/utils.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@tareknaser tareknaser 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 to me
verbose flag works as expected too

coffee_github/src/utils.rs Outdated Show resolved Hide resolved
This commit introduce a basic refactoring that remove the libgit2
solution to upgrade a repository and use the pure git command.

Currently we are using git in other places, and it should be fine to use
it there.

To keep faith in our contribution guide line, we should implement the
simple things that works, without implementing a complex things that did
not work.

At some point when coffee is stable we can thing to remove the git
command usage and use a pure git library.

Changelog-Fixed: git: remove the libgit2 upgrade commands and use a raw
git command
Signed-off-by: Vincenzo Palazzo <[email protected]>
This semplify the code to report the upgrade status by
storing the commit information inside the enum itself.

Changelog-Added: lib: store the commit information inside the enum
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
This commit pass down the verbose running information down
to the upgrade method of the repository.

Changelog-Added: lib: accept the verbose flag during upgrading
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
@vincenzopalazzo vincenzopalazzo merged commit 638698f into master Feb 6, 2024
9 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.

coffee upgrade is not working always coffee upgrade should support the verbose command
2 participants