Chore(Fortune): replace shell script with Python for better compatibility
This commit is contained in:
@@ -11,10 +11,26 @@ repos:
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: check-special-event
|
||||
name: check-special-event
|
||||
entry: bash scripts/check-events.sh
|
||||
language: system
|
||||
files: ^fortune_generator/json/.*_special\.json$
|
||||
- id: check-cyclical-event
|
||||
name: check-cyclical-event
|
||||
entry: python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical
|
||||
language: python
|
||||
files: fortune_generator/json/cyclical_special.json
|
||||
types: [json]
|
||||
pass_filenames: false
|
||||
|
||||
- id: check-custom-event
|
||||
name: check-custom-event
|
||||
entry: python3 scripts/check-events.py fortune_generator/json/custom_special.json custom
|
||||
language: python
|
||||
files: fortune_generator/json/custom_special.json
|
||||
types: [json]
|
||||
pass_filenames: false
|
||||
|
||||
- id: check-static-event
|
||||
name: check-static-event
|
||||
entry: python3 scripts/check-events.py fortune_generator/json/static_special.json static
|
||||
language: python
|
||||
files: fortune_generator/json/static_special.json
|
||||
types: [json]
|
||||
pass_filenames: false
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
python3 scripts/check-events.py fortune_generator/json/custom_special.json custom
|
||||
python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical
|
||||
python3 scripts/check-events.py fortune_generator/json/static_special.json static
|
||||
Reference in New Issue
Block a user