Sammyjo20 / lasso

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

Feature: --use-commit flag #51

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:

The bundles can be generated during the CI pipeline, without having commit or upload the bundle file to the filesystem. Rolling back to previous commits ensures that the corresponding bundle is available and easily identifiable.

go0sedev commented 2 years ago

@Sammyjo20 - I picked up a small issue, with the hash, after the last change. It should be working correctly now.

Sammyjo20 commented 2 years ago

Hi @gustavtrenwith sorry for being slow on reviewing this... Work has been incredibly busy. Will sort this soon.

go0sedev commented 2 years ago

Hey Sam,

All good. I am carrying on. Imtroduced a bunch of new features on the formed version that is working very nicely on my usecase. Feel free to pull into main repo.

Shout if you need any help. Happy to be of assistance.

Go0se

go0sedev commented 2 years ago

Any update on this?

Sammyjo20 commented 2 years ago

Hi @gustavtrenwith,

I'm going to spin up a version of Laravel now and test this.

Sammyjo20 commented 2 years ago

Great work @gustavtrenwith, thanks so much for waiting this long for me to approve and merge this in. Work was super crazy but thanks for adding this to Lasso.