mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-05-19 12:44:24 +02:00
make path to atlas a variable
This commit is contained in:
parent
5108f7ff36
commit
8ed9659cdb
2
.github/workflows/github-actions.yml
vendored
2
.github/workflows/github-actions.yml
vendored
|
@ -9,4 +9,4 @@ jobs:
|
|||
- name: Validate JSON
|
||||
run: |
|
||||
chmod +x ${{ github.workspace }}/tools/validate_json.py
|
||||
python3 ${{ github.workspace }}/tools/validate_json.py
|
||||
python3 ${{ github.workspace }}/tools/validate_json.py$ {{ github.workspace }}/web/atlas.json
|
|
@ -1,5 +1,14 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import json
|
||||
|
||||
json.load(open("./../web/atlas.json"))
|
||||
path = "./../web/atlas.json"
|
||||
|
||||
# path override as 1st param: validate_json.py path_to_file.json
|
||||
if (len(sys.argv) > 1):
|
||||
path = sys.argv[1]
|
||||
|
||||
json.load(open(path))
|
||||
|
||||
print("JSON is valid")
|
Loading…
Reference in a new issue