metaist / cosmofy

Cosmopolitan Python Bundler
MIT License
3 stars 0 forks source link

add: `--release-url` #3

Closed metaist closed 1 month ago

metaist commented 1 month ago

Inject the updater into Lib/site-packages and route CLI args through its main to check for --self-update args (which trigger self-updating behavior).

Support the following bits of the python interface:

metaist commented 1 month ago

The updater should accept environment variables to override it's baked-in values. Maybe: COSMOFY_URL_RELEASE, COSMOFY_URL_METADATA (which defaults to COSMOFY_URL_RELEASE + ".json")

metaist commented 1 month ago

So merely sticking this url in .args is insufficient because I also need to know the date this file was built. I could go off of mdate but that feels risky. Instead, I'll embed a .cosmofy.json into the output that has the URL and the date.

metaist commented 1 month ago

Oh, wait. updater.py doesn't have ZipFile2, so I'll need to use the regular zipfile to read the file contents.