Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@vmaerten
Copy link
Member

@vmaerten vmaerten commented May 19, 2024

Fixes #872

Following this PR :

task/setup.go

Lines 241 to 253 in a74b0bc

currentVersion, err := semver.NewVersion(version.GetVersion())
if err != nil {
return nil
}
// Error if the Taskfile uses a schema version above the current version of Task
if schemaVersion.GreaterThan(currentVersion) {
return &errors.TaskfileVersionCheckError{
URI: e.Taskfile.Location,
SchemaVersion: schemaVersion,
Message: fmt.Sprintf(`is greater than the current version of Task (%s)`, currentVersion.String()),
}
}

This does not work when the sum is displayed in the version
Cf :
image
And
if info.Main.Sum != "" {
ver += fmt.Sprintf(" (%s)", info.Main.Sum)
}

Copy link
Member

@pd93 pd93 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. Bit of an oversight on my part when doing #1465. A couple of minor suggestions

@vmaerten
Copy link
Member Author

It's done @pd93
Thanks a lot for your review, especially about "Go-like code" Even if we are using Go at work, it's always good to know
good practices

@vmaerten vmaerten requested a review from pd93 May 20, 2024 14:01
Copy link
Member

@pd93 pd93 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. Thanks!

@pd93 pd93 merged commit 1e25cea into go-task:main May 20, 2024
pd93 added a commit that referenced this pull request May 20, 2024
@pd93 pd93 mentioned this pull request May 20, 2024
@vmaerten vmaerten deleted the fix/version-check branch July 7, 2024 11:40
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.

Specify minimum required task verison.

3 participants