From a714b68774b0ab9ca79442740bdd4636a41cdd1f Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 23 Jan 2024 11:36:43 +0300 Subject: [PATCH] Simplify regular expressions for `compileall` --- add-pubkey/post-checkout | 4 ++-- hooks/post-checkout/compyle | 4 ++-- hooks/post-checkout/compyle-all | 4 ++-- hooks/post-merge | 4 ++-- hooks/post-rewrite | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/add-pubkey/post-checkout b/add-pubkey/post-checkout index 19ac074..5017228 100755 --- a/add-pubkey/post-checkout +++ b/add-pubkey/post-checkout @@ -11,8 +11,8 @@ if [ \( "$new_branch" = 1 \) ]; then if [ "$new_HEAD" = "`git rev-parse phd-pubkey`" ]; then git clean -d -f -q else - python -m compileall -q -x '\.tox/.+' . && - python -O -m compileall -q -x '\.tox/.+' . + python -m compileall -q -x '\.tox/' . && + python -O -m compileall -q -x '\.tox/' . fi fi diff --git a/hooks/post-checkout/compyle b/hooks/post-checkout/compyle index 0952d43..c781913 100755 --- a/hooks/post-checkout/compyle +++ b/hooks/post-checkout/compyle @@ -8,8 +8,8 @@ new_HEAD="$2" new_branch="$3" if [ "$new_branch" = 1 ]; then - python -m compileall -q -x '\.tox/.+' . && - python -O -m compileall -q -x '\.tox/.+' . + python -m compileall -q -x '\.tox/' . && + python -O -m compileall -q -x '\.tox/' . fi exit 0 diff --git a/hooks/post-checkout/compyle-all b/hooks/post-checkout/compyle-all index d4887f6..3cdae19 100755 --- a/hooks/post-checkout/compyle-all +++ b/hooks/post-checkout/compyle-all @@ -2,7 +2,7 @@ # post-checkout hook that compiles python files to byte code -python -m compileall -q -x '\.tox/.+' . && -python -O -m compileall -q -x '\.tox/.+' . +python -m compileall -q -x '\.tox/' . && +python -O -m compileall -q -x '\.tox/' . exit 0 diff --git a/hooks/post-merge b/hooks/post-merge index 633a1d0..2df0670 100755 --- a/hooks/post-merge +++ b/hooks/post-merge @@ -2,7 +2,7 @@ # post-merge hook that compiles python files to byte code -python -m compileall -q -x '\.tox/.+' . && -python -O -m compileall -q -x '\.tox/.+' . +python -m compileall -q -x '\.tox/' . && +python -O -m compileall -q -x '\.tox/' . exit 0 diff --git a/hooks/post-rewrite b/hooks/post-rewrite index df28442..59efb3d 100755 --- a/hooks/post-rewrite +++ b/hooks/post-rewrite @@ -2,7 +2,7 @@ # post-rewrite hook that compiles python files to byte code -python -m compileall -q -x '\.tox/.+' . && -python -O -m compileall -q -x '\.tox/.+' . +python -m compileall -q -x '\.tox/' . && +python -O -m compileall -q -x '\.tox/' . exit 0 -- 2.39.5