-
Notifications
You must be signed in to change notification settings - Fork 38
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enables downloading images from the c-i.u.c/wsl #235
Conversation
Only kinetic (22.10) and later are published to that location. Previous versions stay in cloud-images.ubuntu.com/
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.
No worry! This can be simplified though if I got what you are trying to do. No need to define an anynomous function to execute it right away.
@@ -34,7 +35,14 @@ func buildGHMatrix(csvPath, metaPath string) error { | |||
if i == 0 { | |||
t = "" | |||
} | |||
t += fmt.Sprintf("https://cloud-images.ubuntu.com/%s/current/%s-server-cloudimg-%s-wsl.rootfs.tar.gz::%s", r.CodeName, r.CodeName, arch, arch) | |||
// Currently only Kinetic (22.10) and later are published to "https://cloud-images.ubuntu.com/wsl/" | |||
codeNameSubUri := func() string { |
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.
hum, it seems a little bit complicated when you can write it that way:
codeNameSubUri := r.CodeName
if strings.Compare(r.BuildVersion, "2210") >= 0 {
codeNameSubUri = filepath.Join("wsl", r.CodeName)
}
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.
You got it right. Thanks for the suggestion.
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.
LGTM! :) Approving
My Go skills are a bit rusty, so I'd prefer asking review from an expert. 馃槃
Per the CPC team information. Kinetic (22.10) and later versions are to be published to that location (see https://cloud-images.ubuntu.com/wsl/kinetic/ for instance). Previous versions stay in cloud-images.ubuntu.com.
This PR aims to let the build matrix routine to differentiate the base URI from where to download the images.