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

Add Golang support #1258

Merged
merged 54 commits into from
Apr 17, 2023
Merged

Add Golang support #1258

merged 54 commits into from
Apr 17, 2023

Conversation

olblak
Copy link
Member

@olblak olblak commented Mar 31, 2023

Also related to #1088

This pullrequest introduces four golang related plugins.

  • golang to retrieve the latest Golang version and its changelog

    • The source retrieve a Golang version and a http link to the changelog
    • The condition checks that a specific version exists
  • golang/gomod to manipulate go.mod file (retr)

    • The source retrieves the version for a specific go module path or the go version specified in the go.mod
    • The condition checks that a version is used for a specific go module path or if a specific go version is specified
    • The target allows to update module version or go version
  • golang/module to retrieve go module version from the registry

  • The source retrieves a version from the registry

  • The condition checks that a version exists on a registry

  • Golang autodiscovery plugin

  • Changelog function querying github uses UPDATECLI_GITHUB_TOKEN or GITHUB_TOKEN to do authenticated call

  • Golang autodiscovery only update module using valid sementic versioning

The reason why the module golang is useful is because the Golang project publish version such as go1.20 where the prefix go is annoying as it prevent us to sort versions. Also all new major version, do not contain the patch number, so I am adding the zero to it. Such as go1.20 would become 1.20.0

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/go/language/
go test
cd pkg/plugins/resources/go/gomod/
go test
cd pkg/plugins/resources/go/module/
go test
go build -o bin/updatecli .
./bin/updatecli diff --config e2e/updatecli.d/success.d/golang/

Additional Information

Tradeoff

/

Potential improvement

  • Golang proxy allows the ability to retrieve the source repository. This is usefull for go module that uses a different name than the source repository. It would retrieve that information

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added go/version enhancement New feature or request labels Mar 31, 2023
@olblak olblak changed the title Allow to retrieve the Golang version Golang version support Mar 31, 2023
@olblak olblak marked this pull request as draft March 31, 2023 19:43
@olblak olblak changed the title Golang version support Add Golang version support Mar 31, 2023
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak changed the title Add Golang version support Add Golang support Apr 1, 2023
olblak and others added 10 commits April 2, 2023 20:44
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
olblak and others added 28 commits April 10, 2023 21:10
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak merged commit ba335ee into updatecli:main Apr 17, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go/version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants