Commit 82ccf63d authored by Thibault Saunier's avatar Thibault Saunier

flatpak: Allow comments in json file

parent 92ed9f2f
......@@ -3,7 +3,6 @@
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: autopep8-wrapper
files: ^git-phab$
- id: check-docstring-first
......
......@@ -22,6 +22,7 @@ import argparse
import configparser
import json
import os
import re
import shutil
import subprocess
import sys
......@@ -80,7 +81,9 @@ def expand_json_file(json_template, outfile, basedir, gst_version, branchname):
pass
with open(json_template, "r") as tf:
template = json.load(tf)
txt = re.sub('/\*[^*]*\*+(?:[^/*][^*]*\*+)*/', '', tf.read())
template = json.loads(txt)
if branchname == "stable":
try:
del template["desktop-file-name-prefix"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment