mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Moved runner into this repo, update dep files and now builds.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user