Skip to content

Add hack/update-template-archlinux.sh #2788

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

Merged

Conversation

norio-nomura
Copy link
Contributor

@norio-nomura norio-nomura commented Oct 23, 2024

$ hack/update-template-archlinux.sh
update-template-archlinux.sh: Update the Arch-Linux image location in the specified templates

Usage:
  update-template-archlinux.sh <template.yaml>...

Description:
  This script updates the Arch-Linux 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.

  Image location basename format: Arch-Linux-<arch>-cloudimg[-<date>.<CI_JOB_ID>].qcow2

  Published Arch-Linux image information is fetched from the following URLs:

    x86_64:
      listing: https://gitlab.archlinux.org/api/v4/projects/archlinux%2Farch-boxes/packages
      details: https://gitlab.archlinux.org/api/v4/projects/archlinux%2Farch-boxes/packages/:package_id/package_files

    aarch64:
      https://github.com/mcginty/arch-boxes-arm/releases/

  Using 'gh' CLI tool for fetching the latest release from GitHub.

Examples:
  Update the Arch-Linux image location in templates/**.yaml:
  $ update-template-archlinux.sh templates/**.yaml

  Update the Arch-Linux image location in ~/.lima/archlinux/lima.yaml:
  $ update-template-archlinux.sh ~/.lima/archlinux/lima.yaml
  $ limactl factory-reset archlinux

Flags:
  -h, --help              Print this help message

This PR aims to add Arch-Linux support as per #1347.

@norio-nomura norio-nomura force-pushed the update-template-archlinux.sh branch from a38e91a to 5a7ce6f Compare October 23, 2024 05:08

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
```console
$ hack/update-template-archlinux.sh
update-template-archlinux.sh: Update the Arch-Linux image location in the specified templates

Usage:
  update-template-archlinux.sh <template.yaml>...

Description:
  This script updates the Arch-Linux 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.

  Image location basename format: Arch-Linux-<arch>-cloudimg[-<date>.<CI_JOB_ID>].qcow2

  Published Arch-Linux image information is fetched from the following URLs:

    x86_64:
      listing: https://gitlab.archlinux.org/api/v4/projects/archlinux%2Farch-boxes/packages
      details: https://gitlab.archlinux.org/api/v4/projects/archlinux%2Farch-boxes/packages/:package_id/package_files

    aarch64:
      https://github.com/mcginty/arch-boxes-arm/releases/

  Using 'gh' CLI tool for fetching the latest release from GitHub.

Examples:
  Update the Arch-Linux image location in templates/**.yaml:
  $ update-template-archlinux.sh templates/**.yaml

  Update the Arch-Linux image location in ~/.lima/archlinux/lima.yaml:
  $ update-template-archlinux.sh ~/.lima/archlinux/lima.yaml
  $ limactl factory-reset archlinux

Flags:
  -h, --help              Print this help message
```

Signed-off-by: Norio Nomura <[email protected]>
@norio-nomura norio-nomura force-pushed the update-template-archlinux.sh branch from 5a7ce6f to 5c64244 Compare October 23, 2024 05:11
@norio-nomura norio-nomura changed the title Add update-template-archlinux.sh Add hack/update-template-archlinux.sh Oct 23, 2024
@AkihiroSuda AkihiroSuda added this to the v1.0 milestone Oct 23, 2024
@AkihiroSuda AkihiroSuda added the guest/archlinux Guest: Arch Linux label Oct 23, 2024
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit cd4cc76 into lima-vm:master Oct 23, 2024
28 checks passed
@norio-nomura
Copy link
Contributor Author

Thanks! 🙏🏻

@norio-nomura norio-nomura deleted the update-template-archlinux.sh branch October 23, 2024 05:39
@AkihiroSuda AkihiroSuda mentioned this pull request Oct 23, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guest/archlinux Guest: Arch Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants