-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Use go template for powershell, golang and node #1095
base: master
Are you sure you want to change the base?
Conversation
5c9e788
to
ab15153
Compare
ab15153
to
0e1e1e2
Compare
pkg/get/url_checker_test.go
Outdated
@@ -14,6 +14,7 @@ func Test_CheckTools(t *testing.T) { | |||
tools := MakeTools() | |||
toolsToSkip := []string{ | |||
"kumactl", // S3 bucket disallow HEAD requests | |||
"flyctl", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK let me know when you have..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
pkg/get/tools.go
Outdated
Repo: "go", | ||
Name: "go", | ||
SystemOnly: true, | ||
Version: "1.22.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since go does not uses github or k8s version strategy, will it be correct to hard-code it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option is to hard-code it, the other thing we could have a strategy for go and move the code from the system installer there. The version can already be determined.
@rgee0 what are your thoughts? Go is installed via system install
with custom code, we are looking at using the template system instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking to execute go version detection code to be only executed when cli is actually installing the go. I am not sure, how to setup that in current code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a similar approach to the existing version strategies but using: https://go.dev/VERSION?m=text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest a similar approach to the exiting version strategies but using: https://go.dev/VERSION?m=text
This is implemented in system install but we are stuck around how to implement same in template approach
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies I missed The version can already be determined
, maybe im also missing some context, but you're using GetDownloadURL
which will take you into GetUrl
which is where the existing version strategies are implemented. tool
is available all the way through so a goVersionStrategy
could be implemented in there in much the same way as k8s is.
0e1e1e2
to
699646a
Compare
c03dce7
to
6998f2b
Compare
36b76f9
to
82a9a6f
Compare
Thats the approach I had in mind. You can see how with any further version strategies we might benefit from looking at optimising the approach to them, but I think we're OK for the moment. The only thought I had was whether there'd be greater safety in parsing the content returned by go.dev/VERSION through a regex to extract the version. This would defend a situation where the content might change to add additional content that precedes the existing |
5bf976f
to
165b315
Compare
Changes are done. |
6484861
to
33bd535
Compare
bdfb12a
to
ae9f9cc
Compare
Signed-off-by: Nitishkumar Singh <[email protected]> move powershell and go to tools Signed-off-by: Nitishkumar Singh <[email protected]> empty commit Signed-off-by: Nitishkumar Singh <[email protected]> implement custom version resolver Signed-off-by: Nitishkumar Singh <[email protected]> switch node to tools Signed-off-by: Nitishkumar Singh <[email protected]>
ae9f9cc
to
299eb4f
Compare
Description
We are extending go template usage for system install apps like powershell, go and node
Motivation and Context
design/approved
by a maintainer (required)Closes Use Go template for system install apps #1094
How Has This Been Tested?
If updating or adding a new CLI to
arkade get
, run:Types of changes
Documentation
./arkade get --format markdown
./arkade install --help
Checklist:
git commit -s