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

More cleanup before v2.0.0 #436

Merged
merged 3 commits into from
Mar 14, 2024
Merged

More cleanup before v2.0.0 #436

merged 3 commits into from
Mar 14, 2024

Conversation

sebastian-quintero
Copy link
Member

Description

More cleanup:

  • Updated Go workflows to use Go 1.22
  • Removed Python workflows
  • Updated linting file for Go 1.22. Removed packages that no longer exist.
  • Updated go.mod to use Go 1.21.
  • Fixed linting exceptions.
  • Removed version logic to just reference the version of the project. The override version used to exist to jump hoops with plugins, it is not needed anymore.

@sebastian-quintero sebastian-quintero self-assigned this Mar 14, 2024
version.go Outdated
Comment on lines 10 to 13
// VERSION of Nextmv SDK.
//
//go:embed VERSION
var versionFallback string

// VERSION of Nextmv SDK.
var VERSION = getVersion()

func getVersion() string {
// Get version from module dependency.
bi, ok := debug.ReadBuildInfo()
if !ok {
// If this happens, we're not running in a module context. We default to
// returning the fallback version.
return versionFallback
}

for _, dep := range bi.Deps {
// We only care about this repo being used as a dependency.
if !strings.HasPrefix(dep.Path, "github.com/nextmv-io/sdk") {
continue
}

return dep.Version
}

// If this happens, we're running in a module in which sdk is not a
// dependency. In this case, we expect the NEXTMV_SDK_OVERRIDE_VERSION to be
// set. Thus, this is unexpected. So, return a string that helps us find the
// way back here.
return "no-overridden-version-found"
}
var VERSION string
Copy link
Member

Choose a reason for hiding this comment

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

Do we really want to drop this? This still works fine and is more accurate. We only need to shuffle it around to fallback to VERSION instead of "no-overridden-version-found".

@merschformann merschformann merged commit 1195197 into develop Mar 14, 2024
14 checks passed
@merschformann merschformann deleted the feature/more-cleanup branch March 14, 2024 16:30
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.

2 participants