Skip to content

Commit c9eb4c2

Browse files
Closes #3, #4 - Update specification schema path, regenerate types (#6)
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
1 parent d94f812 commit c9eb4c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hack/generate-spec-types.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
# limitations under the License.
1515

1616

17-
which ./bin/gojsonschema >/dev/null || go build -o ./bin/gojsonschema github.com/atombender/go-jsonschema/cmd/gojsonschema
17+
which ./bin/gojsonschema >/dev/null || go build -o ./bin/gojsonschema github.com/atombender/go-jsonschema/cmd/gojsonschema && go mod tidy
1818

1919
echo "--> Generating specification types"
2020

2121
declare targetdir="/tmp/serverlessworkflow"
2222

23-
if [ -d "${targetdir}" ]; then
23+
if [ ! -d "${targetdir}" ]; then
2424
git clone git@github.com:serverlessworkflow/specification.git ${targetdir}
2525
fi
2626

27-
./bin/gojsonschema -o generated.types_spec.go -p sw "${targetdir}"/specification/schema/workflow.json
27+
./bin/gojsonschema -o generated.types_spec.go -p sw "${targetdir}"/schema/workflow.json
2828

2929
cp -v generated.types_spec.go ./pkg/apis/sw/
3030

0 commit comments

Comments
 (0)