1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-10 12:20:10 +00:00

add version to default config file

This commit is contained in:
Harvey Tindall 2020-09-05 17:32:13 +01:00
parent 3dd2dbff15
commit 9850545f1b
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
3 changed files with 8 additions and 5 deletions

View File

@ -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

View File

@ -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"

View File

@ -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))