kontena / chpharos

Pharos version switcher
https://get.pharos.sh/
Apache License 2.0
3 stars 4 forks source link

Publish and cache remote file list online #9

Closed kke closed 6 years ago

kke commented 6 years ago

The function remote_files() contents are supposed to come from some URL.

It's called several times during one run when doing an install, so it should probably be cached locally so it's only downloaded max once per run.

kke commented 6 years ago

This can be done by modifying the function _chpharos_remote_files function to just curl/wget the list from somewhere online and output it to stdout.

The file is | separated.

The fields are:

The "list of downloads" format is:

executable_filename|file_size_in_bytes|shasum|download_url;executable2_filename|file2_size_in_bytes|shasum2|download_url2

The shasum is sha256, generated by shasum -a 256 filename.

kke commented 6 years ago

And the file list url should probably be configurable for air-gapped installations through something like CHPHAROS_VERSION_LIST_URL.

kke commented 6 years ago

Done in master