Commit ade39ec 1 parent 6e2084e commit ade39ec Copy full SHA for ade39ec
File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def get_description(item):
100
100
101
101
102
102
base_path = sys .argv [1 ]
103
- with open ("%s/scripts/ cli-reference.yaml" % base_path ) as stream :
103
+ with open ("%s/cli-reference.yaml" % base_path ) as stream :
104
104
try :
105
105
reference = yaml .safe_load (stream )
106
106
@@ -114,7 +114,7 @@ def get_description(item):
114
114
subcommand ["arguments" ] = arguments
115
115
subcommand ["parameters" ] = parameters
116
116
117
- templateLoader = jinja2 .FileSystemLoader (searchpath = "%s/scripts/templates/ " % base_path )
117
+ templateLoader = jinja2 .FileSystemLoader (searchpath = "%s/scripts/" % base_path )
118
118
environment = jinja2 .Environment (loader = templateLoader )
119
119
120
120
environment .filters ["no_newline" ] = no_newline
@@ -129,7 +129,7 @@ def get_description(item):
129
129
130
130
template = environment .get_template ("cli-wrapper.jinja2" )
131
131
output = template .render ({"commands" : reference ["commands" ]})
132
- with open ("%s/cli.py" % base_path , "t+w" ) as target :
132
+ with open ("%s/simplyblock_cli/ cli.py" % base_path , "t+w" ) as target :
133
133
target .write (output )
134
134
135
135
except yaml .YAMLError as exc :
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ PYTHON=" $( command -v python) "
4
+ if [[ " ${PYTHON} " == " " ]]; then
5
+ PYTHON=" $( comamnd -v python3) "
6
+ fi
7
+
8
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
9
+ ${PYTHON} " ${SCRIPT_DIR} /cli-wrapper-gen.py" " ${SCRIPT_DIR} /.."
You can’t perform that action at this time.
0 commit comments