-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(pre-commit): image compression hook , WIP #47
Conversation
# If Host is linux, install imagemagick | ||
if [ "$(uname)" == "Linux" ]; then | ||
echo >&2 "Installing imagemagick..." | ||
sudo apt-get install imagemagick |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not platform agnostic
Use imagemagick binary and copy it to ~/.bin and make it executable
fi | ||
# If Host Is Windows, install imagemagick | ||
if [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then | ||
echo >&2 "May god have mercy on your soul..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a real OS**
✝✝✝✝✝ |
Define your script in separate .sh to make it reusable. Is this script idempotent ? Make sure image quality settings are configurable without modifying the code |
Proposal so this works perfectly with pre-commit :
Don't forget to use https://github.com/koalaman/shellcheck to ensure code quality 🔥 |
Initial Draft PR for the image compression pre-commit
This PR will be the start of the changes made to: