Sammyjo20 / lasso

🐎 Lasso is a Laravel package created to make your deployments blazing fast.
MIT License
341 stars 16 forks source link

Feature to use git commit as bundle id #50

Closed go0sedev closed 2 years ago

go0sedev commented 2 years ago

This commit does not change any of the existing functionality.

Both commands for publishing and pulling bundles now has an extra flag --use-commit:

If the flag is passed, the command will attempt to retrieve the commit hash from the git branch and use that as the bundle ID. When pulling with the flag, the bundle ID from the lasso-bundle.json file will be ignored, and the git commit will be used for the zip file name.

This is useful in the scenario where the user wants the bundles to coincide with the git hashes, adding the following 2 advantages: 1) The bundles can be generated during the CI pipeline, without having commit or upload the bundle file to the filesystem. 2) Rolling back to previous commits ensures that the corresponding bundle is available and easily identifiable.

go0sedev commented 2 years ago

Making new PR without changes to composer