Moved runner into this repo, update dep files and now builds.

This commit is contained in:
Travis Reeder
2017-04-21 07:42:42 -07:00
parent 615ae5c36f
commit d0ca2f9228
75 changed files with 4149 additions and 65 deletions

View File

@@ -12,8 +12,6 @@ If this is your first time building the clients, you'll need to do the following
gem install http
```
2) Create a secret gist on Github and get an API token too.
### Every Time
Everytime the API spec is updated, be sure to bump the version number in `swagger.yml`, then run:

View File

@@ -88,7 +88,7 @@ languages.each do |l|
puts "SKIPPING GO, it's manual for now."
# This is using https://goswagger.io/ instead
# TODO: run this build command instead: this works if run manually
# dep ensure --update && docker run --rm -it -v $HOME/dev/go:/go -w /go/src/github.com/kumokit/functions_go quay.io/goswagger/swagger generate client -f https://raw.githubusercontent.com/kumokit/functions/master/docs/swagger.yml -A functions
# dep ensure --update && docker run --rm -it -v $HOME/dev/go:/go -w /go/src/github.com/iron-io/functions_go quay.io/goswagger/swagger generate client -f https://raw.githubusercontent.com/kumokit/functions/master/docs/swagger.yml -A functions
else
gen = JSON.parse(HTTP.post("https://generator.swagger.io/api/gen/clients/#{l}",
json: {

View File

@@ -304,7 +304,7 @@ func genSwaggerClient(target string) error {
return err
}
cmd := exec.Command("docker", "run", "--rm", "-u", fmt.Sprintf("%s:%s", u.Uid, u.Gid), "-v", fmt.Sprintf("%s/%s:/go/src/github.com/kumokit/functions_go", cwd, target), "-v", fmt.Sprintf("%s/%s:/go/swagger.spec", cwd, swaggerURL), "-w", "/go/src", "quay.io/goswagger/swagger", "generate", "client", "-f", "/go/swagger.spec", "-t", "github.com/kumokit/functions_go", "-A", "functions")
cmd := exec.Command("docker", "run", "--rm", "-u", fmt.Sprintf("%s:%s", u.Uid, u.Gid), "-v", fmt.Sprintf("%s/%s:/go/src/github.com/iron-io/functions_go", cwd, target), "-v", fmt.Sprintf("%s/%s:/go/swagger.spec", cwd, swaggerURL), "-w", "/go/src", "quay.io/goswagger/swagger", "generate", "client", "-f", "/go/swagger.spec", "-t", "github.com/iron-io/functions_go", "-A", "functions")
d, err := cmd.CombinedOutput()
if err != nil {
log.Printf("Error running go-swagger: %s\n", d)