Skip to content

Commit

Permalink
feat: allow overriding the compared version
Browse files Browse the repository at this point in the history
Looking at you RustRover, returning a different version than the one in
the release archive.
  • Loading branch information
femnad committed Jun 14, 2024
1 parent a7f0372 commit e8dbba2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions precheck/unless/unless.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type Unless struct {
Pwd string `yaml:"pwd"`
Shell bool `yaml:"shell"`
Stat string `yaml:"stat"`
// For when the returned version is different from what needs to be replace the version part in URL.
VersionOutput string `yaml:"version_output"`
}

func (u Unless) String() string {
Expand Down Expand Up @@ -116,6 +118,10 @@ func shouldSkip(unlessable Unlessable, s settings.Settings) bool {
return false
}

if unless.VersionOutput != "" {
version = unless.VersionOutput
}

if postProc != version {
internal.Log.Debugf("%s: existing version `%s`, required version `%s`", name, postProc, version)
return false
Expand Down

0 comments on commit e8dbba2

Please sign in to comment.