8 Commits

Author SHA1 Message Date
Alan Rominger
9745058546
Only block commits if black fails for certain paths (#14531) 2023-10-10 10:12:57 -04:00
Rick Elrod
b8ba2feecd Tell Makefile and pre-commit.sh that they are bash
On some systems, /bin/sh is a bash symlink and running it will launch
bash in sh compatibility mode. However, bash-specific syntax will still
work in this mode (for example using == or pipefail).

However, on systems where /bin/sh is a symlink to another shell (think:
Debian-based) they might not have those bashisms.

Set the shell in the Makefile, so that it uses bash (since it is already
depending on bash, even though it is calling it as /bin/sh by default),
and add a shebang to pre-commit.sh for the same reason.

Signed-off-by: Rick Elrod <rick@elrod.me>
2023-07-14 12:06:55 -05:00
John Westcott IV
cb5a8aa194
Fix black pre-commit hook (#14212) 2023-07-06 16:36:50 -04:00
John Westcott IV
fcdff8bdfb
Fixing pre-commit.sh for OS X (#11953) 2022-03-24 11:39:29 -04:00
John Westcott IV
b9cdd6f2c8
Adding ability to run user level pre-commit hooks (#11923)
* Adding ability to run user level pre-commit hooks
* Adding pre-commit docs in CONTRIBUTING.md
2022-03-24 10:58:14 -04:00
John Westcott IV
c8b906ffb7
Workflow changes (#11692)
Modifying workflows to install python for make commands
Squashing CI tasks to remove repeated steps
Modifying pre-commit.sh to not fail if there are no python file changes
2022-02-07 15:42:35 -05:00
Jeff Bradberry
d07887bd91 Remove the shebang line from pre-commit.sh
since bash isn't available by default on OS X.
2021-05-13 10:49:24 -04:00
Jeff Bradberry
1e5a0dc7c5 Break out the pre-commit hook into an explicit script
This means that

- we don't have to be always updating the underlying .git/hooks/pre-commit file
- updates to the logic will just work automatically
- the logic of the black logic has been fixed so that AWX_IGNORE_BLACK=1 should work right now
2021-05-12 11:54:17 -04:00