Fix codegen macos issues and update Makefile to use codegen.sh
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: build realize dep spec protobuf qa qa.test qa.vet
|
||||
.PHONY: build realize dep spec protobuf qa qa.test qa.vet codegen
|
||||
|
||||
PKG = "github.com/$(shell cat .project)"
|
||||
|
||||
@@ -28,9 +28,8 @@ dep.update:
|
||||
dep:
|
||||
dep ensure -v
|
||||
|
||||
spec: $(SPEC)
|
||||
cd sam/docs/src && $(SPEC)
|
||||
cd sam/ && ./_gen.sh
|
||||
codegen: $(SPEC)
|
||||
./codegen.sh
|
||||
|
||||
protobuf: $(PROTOC)
|
||||
# @todo this needs work (it hangs and outputs nothing)
|
||||
|
||||
+3
-2
@@ -1,14 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
_PWD=$PWD
|
||||
SPECS=$(find $PWD -name 'spec.json' | xargs -n1 dirname)
|
||||
for SPEC in $SPECS; do
|
||||
echo "=== spec $SPEC ==="
|
||||
cd $SPEC && rm -rf spec && spec && cd $_PWD
|
||||
cd $SPEC && rm -rf spec && ${GOPATH}/bin/spec && cd $_PWD
|
||||
|
||||
SRC=$(dirname $(dirname $SPEC))
|
||||
echo "=== codegen $SRC ==="
|
||||
GOPATHS=$(codegen/codegen.php $(basename $SRC) | tee -a /dev/stderr | xargs --no-run-if-empty -n1 dirname | sort | uniq)
|
||||
GOPATHS=$(codegen/codegen.php $(basename $SRC) | tee -a /dev/stderr | xargs -n1 dirname | sort | uniq)
|
||||
for FOLDER in $GOPATHS; do
|
||||
if [[ $FOLDER != "." ]]; then
|
||||
echo "== go fmt $FOLDER =="
|
||||
|
||||
Reference in New Issue
Block a user