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

Spefify Go version by go.mod #110

Merged
merged 7 commits into from
Feb 19, 2023
Merged

Spefify Go version by go.mod #110

merged 7 commits into from
Feb 19, 2023

Conversation

hmiyado
Copy link
Contributor

@hmiyado hmiyado commented Jan 31, 2023

resolve: #99

This PR enables to specify Go version by go.mod.

@wangyoucao577
Copy link
Owner

It might be better to use goversion var directly, something like goversion: go.mod or goversion: ./project1/go.mod. If the INPUT_GOVERSION ends with go.mod, parse it and use its version.
By the way, it also needs a test(in https://github.com/wangyoucao577/go-release-action/blob/master/.github/workflows/autotest.yml) to verify new functions.
Thanks!

@hmiyado
Copy link
Contributor Author

hmiyado commented Feb 4, 2023

Thank you for your review.

Fixed goversion to specify the path to go.mod directly.

We are currently working on the test as well.
The existing job generates go.mod with the pre_command option.
If go.mod is specified in goversion, go.mod must exist prior to the timing of pre_command.
We believe a separate job is needed.

@wangyoucao577
Copy link
Owner

Thank you for your review.

Fixed goversion to specify the path to go.mod directly.

We are currently working on the test as well. The existing job generates go.mod with the pre_command option. If go.mod is specified in goversion, go.mod must exist prior to the timing of pre_command. We believe a separate job is needed.

Oh, it's ok to create another test app for this test.

@hmiyado
Copy link
Contributor Author

hmiyado commented Feb 7, 2023

I added new test step in 171948d.
Please check this when you have time.

@wangyoucao577 wangyoucao577 merged commit fefe054 into wangyoucao577:master Feb 19, 2023
@hmiyado hmiyado deleted the goversion-via-gomod branch February 20, 2023 12:19
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.

Can I use go version defined in go.mod?
2 participants