tiny-pilot / tinypilot

Use your Raspberry Pi as a browser-based KVM.
https://tinypilotkvm.com
MIT License
2.99k stars 250 forks source link

Make bundle filename similar to image filename #1658

Closed jdeanwallace closed 10 months ago

jdeanwallace commented 10 months ago

Related https://github.com/tiny-pilot/tinypilotkvm.com/issues/1040

This PR changes the TinyPilot bundle filename schema to match that of the TinyPilot Pro image filename schema:

tinypilot-${var.variant}-${var.version}-${var.build_id}.img

This change is needed to be able to infer the image filename from the bundle filename.

We're basically switching the position of the ${TIMESTAMP} with the position of the ${TINYPILOT_VERSION}, in the bundle filename.

Before

tinypilot-community-20231012T1853Z-1.9.1-22+0bde143.tgz

After

tinypilot-community-1.9.1-22+0bde143-2023-10-12T1853Z.tgz

Notes

  1. I was originally worried about adding hyphens back into the ${TIMESTAMP} portion of the filename because the ${TINYPILOT_VERSION} portion can also contain hyphens, especially in the community variant (e.g., 1.8.0-23+649a6b2). So this would mean we couldn't easily split the filename into its different portions, using something like filename.split("-"). However, we never needed to split the bundle filename back into its separate portions. So I think it's A-OK.

Review on CodeApprove

jdeanwallace commented 10 months ago
Automated comment from CodeApprove ➜

⏳ @jotaen4tinypilot please review this Pull Request

jdeanwallace commented 10 months ago

@jotaen4tinypilot - Thanks for the review! I think I jumped the gun with this PR and didn't think it through properly. I've decided to scrap this PR in favor of https://github.com/tiny-pilot/tinypilot-pro/pull/1118 where we maintain the current timestamp formats, but ensure that each filename is based on the same timestamp.