Skip to content

[WIP] added check between pkg version and git tag for consistency #254

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

Closed
wants to merge 1 commit into from

Conversation

octonawish-akcodes
Copy link
Contributor

@octonawish-akcodes octonawish-akcodes commented Jan 25, 2024

1. Does this PR affect any open issues?(Y/N)

  • N
  • Y

fix #190

2. What is the scope of this PR (e.g. component or file name):

pkg/cmd/cmd_add.go

Tried to implement a check @Peefy @zong-zhe

Signed-off-by: Abhishek Kumar <abhishek22512@gmail.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7651824560

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 41.22%

Totals Coverage Status
Change from base Build 7626281344: -0.1%
Covered Lines: 1629
Relevant Lines: 3952

💛 - Coveralls

@@ -257,3 +266,13 @@ func parseOciPkgNameAndVersion(s string) (string, string, error) {

return parts[0], parts[1], nil
}

func checkGitTagConsistency(kclPkg *pkg.KclPkg, gitTag string) *reporter.KpmEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

What needs to be checked here is whether the version of the package is consistent with the version of the remote package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

kclPkg.GetPkgVersion() will give the package version and gitTag consists of the remote version, right. Am I missing something here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this issue should display both the git tag/commit/branch information and the module version information in the kcl.mod file, e.g., k8s = {git = "xxx", tag = "yyy", version = "zzz"}, rather than just checking for inconsistency.

@zong-zhe
Copy link
Contributor

Hi @octonawish-akcodes 😄

The issue corresponding to this PR is re-established to #266, and a more detailed design is provided. You can refer to #266 to adjust your PR.

If you have any difficulties or don't understand anything, let me know 😄

@zong-zhe zong-zhe changed the title added check between pkg version and git tag for consistency [WIP] added check between pkg version and git tag for consistency Feb 21, 2024
@Peefy Peefy closed this Mar 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Add check for package version between kcl.mod and version in command
4 participants