Commit 7bf550a
committed
Add
```console
$ hack/update-template-ubuntu.sh
update-template-ubuntu.sh: Update the Ubuntu image location in the specified templates
Usage:
update-template-ubuntu.sh [--flavor <flavor>|--minimal|--server] [--version <version>] <template.yaml>...
Description:
This script updates the Ubuntu image location in the specified templates.
If the image location in the template contains a release date in the URL, the script replaces it with the latest available date.
If no flags are specified, the script uses the flavor and version from the image location basename in the template.
Image location basename format: ubuntu-<version>-<flavor>-cloudimg-<arch>.img
Released Ubuntu image information is fetched from the following URLs:
Server: https://cloud-images.ubuntu.com/releases/stream/v1/com.ubuntu.cloud:released:download.json
Minimal: https://cloud-images.ubuntu.com/minimal/releases/stream/v1/com.ubuntu.cloud:released:download.json
The downloaded JSON file will be cached in the Lima cache directory.
Examples:
Update the Ubuntu image location in templates/**.yaml:
$ update-template-ubuntu.sh templates/**.yaml
Update the Ubuntu image location in ~/.lima/ubuntu/lima.yaml:
$ update-template-ubuntu.sh ~/.lima/ubuntu/lima.yaml
Update the Ubuntu image location to ubuntu-24.04-minimal-cloudimg-<arch>.img in ~/.lima/docker/lima.yaml:
$ update-template-ubuntu.sh --minimal --version 24.04 ~/.lima/docker/lima.yaml
Flags:
--flavor <flavor> Use the specified flavor image
--server Shortcut for --flavor server
--minimal Shortcut for --flavor minimal
--version <version> Use the specified version
-h, --help Print this help message
```
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
hack/update-ubuntu-image.sh: add `--flavor <flavor>` flag
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
rename to `hack/update-template-ubuntu.sh`
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>update-template-ubuntu.sh
1 parent 4a052fc commit 7bf550a
2 files changed
+401
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
219 | 239 | | |
220 | 240 | | |
221 | 241 | | |
| |||
224 | 244 | | |
225 | 245 | | |
226 | 246 | | |
227 | | - | |
| 247 | + | |
228 | 248 | | |
229 | 249 | | |
230 | 250 | | |
| |||
321 | 341 | | |
322 | 342 | | |
323 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
0 commit comments