CommunityScripts icon indicating copy to clipboard operation
CommunityScripts copied to clipboard

Make builds deterministic and reproducible

Open 7dJx1qP opened this issue 1 year ago • 1 comments

The current build_site.sh script generates a new hash for every deployment even if the plugin hasn't changed. The reason the hashes change is due to file timestamps changing when the build checks out the repo and file order when creating the zip.

To address this, I've updated the script so that it sets each file timestamp to the updated date that's already being used and sorts the files that it zips. I also added sorting of the plugins and themes in the index.yml

7dJx1qP avatar Feb 10 '24 01:02 7dJx1qP

After this PR #244 this repo no more uses the build_site.sh to build the plugins instead a nodejs based build.js, so we can build normal plugins and stash-plugin-builder plugins, you can implement this feature here as build.jsalso uses zip sh under the hood.

Tetrax-10 avatar Feb 10 '24 04:02 Tetrax-10