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

feature request: telling user when new version is available #35

Merged
merged 7 commits into from
Mar 21, 2023

Conversation

nader-zouaoui
Copy link
Contributor

proposal for #32

di-sukharev and others added 6 commits March 17, 2023 14:20
This commit adds a new function that checks if the current version of OpenCommit is the latest version. The function uses the getOpenCommitLatestVersion function from the api module to get the latest version of OpenCommit. If the current version is not the latest version, a warning message is printed to the console, informing the user to update to the latest version to get the latest features and bug fixes.

if (currentVersion !== latestVersion) {
console.warn(
chalk.yellow(
Copy link
Contributor

Choose a reason for hiding this comment

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

@nader-zouaoui What do you think about already suggesting the command to perform the update? ex:

🎉 Update to latest version by running: npm update opencommit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, will do it

Consider updating to the latest version to get the latest features and bug fixes.
Current version: ${currentVersion}
Latest version: ${latestVersion}
🎉 To update to the latest version, run: npm update opencommit
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -1,6 +1,6 @@
{
"name": "opencommit",
"version": "1.1.11",
Copy link
Contributor

Choose a reason for hiding this comment

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

@nader-zouaoui the current version is already 1.1.16. Is your branch up to date?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the computed changes after the merge, so yeah it will be up-to-date after this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I understood!
Per the Contribution Guidelines the pull request must be opened to the master branch. That's why I got confused.

Copy link
Contributor

@openefit openefit Mar 18, 2023

Choose a reason for hiding this comment

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

I think Contribution Guidelines should be updated, and the default should be the dev branch.

@di-sukharev di-sukharev merged commit a6ccdb5 into di-sukharev:dev Mar 21, 2023
zen0bit pushed a commit to oSoWoSo/opencommit that referenced this pull request Apr 12, 2023
…rev#35)

* ✨ feat(cli.ts): add checkIsLatestVersion function

This commit adds a new function that checks if the current version of OpenCommit is the latest version. The function uses the getOpenCommitLatestVersion function from the api module to get the latest version of OpenCommit. If the current version is not the latest version, a warning message is printed to the console, informing the user to update to the latest version to get the latest features and bug fixes.
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.

4 participants