Skip to content

Commit 613f893

Browse files
DevOpsDevOps
authored andcommitted
feat: sync the updated precommitfiles
1 parent ce317bd commit 613f893

3 files changed

Lines changed: 162 additions & 326 deletions

File tree

global/extract_config.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Extract the YAML config from setup_pre_commit_config function in global/pre-commit.sh
4+
# and save it to global/precommitFile/.pre-commit-config.yaml
5+
6+
mkdir -p global/precommitFile
7+
8+
sed -n '/cat > "\$file" <<'\''EOF'\''/,/EOF/p' global/pre-commit.sh | sed '1d;$d' > global/precommitFile/.pre-commit-config.yaml
9+
10+
echo "Config extracted to global/precommitFile/.pre-commit-config.yaml"

0 commit comments

Comments
 (0)