add version to default config file

pull/20/head
Harvey Tindall 4 years ago
parent 3dd2dbff15
commit 9850545f1b
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -10,7 +10,7 @@ before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
- python3 config/fixconfig.py -i config/config-base.json -o data/config-base.json
- python3 config/fixconfig.py -i config/config-base.json -o data/config-base.json --version {{.Version}}
- python3 config/generate_ini.py -i config/config-base.json -o data/config-default.ini
- python3 -m pip install libsass
- python3 scss/get_node_deps.py

@ -2,7 +2,7 @@ configuration:
echo "Fixing config-base"
python3 config/fixconfig.py -i config/config-base.json -o data/config-base.json
echo "Generating config-default.ini"
python3 config/generate_ini.py -i config/config-base.json -o data/config-default.ini
python3 config/generate_ini.py -i config/config-base.json -o data/config-default.ini --version git
sass:
echo "Getting libsass"

@ -7,6 +7,7 @@ from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", help="input config base from jf-accounts")
parser.add_argument("-o", "--output", help="output ini")
parser.add_argument("--version", help="version to include in file")
def generate_ini(base_file, ini_file, version):
@ -43,6 +44,8 @@ def generate_ini(base_file, ini_file, version):
args = parser.parse_args()
print(generate_ini(base_file=args.input,
ini_file=args.output,
version="0.1.0"))
version = "git"
if args.version is not None:
version = args.version
print(generate_ini(base_file=args.input, ini_file=args.output, version=version))

Loading…
Cancel
Save