Skip to content

Commit 4ce2f87

Browse files
CI: fix release builds (#884)
* CI: fix release builds * Solve resty issue once and for all with sed magic
1 parent 920e58b commit 4ce2f87

File tree

16 files changed

+20
-29
lines changed

16 files changed

+20
-29
lines changed

.circleci/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:latest
1+
FROM golang:1.11
22

33
## Warm apt cache
44
RUN apt-get update
@@ -26,11 +26,6 @@ RUN apt-get install -y wget bzip2 && \
2626
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash && \
2727
apt-get remove -y wget
2828

29-
# Install dep
30-
RUN apt-get install -y wget && \
31-
wget -qO- https://raw.githubusercontent.com/golang/dep/master/install.sh | sh && \
32-
apt-get remove -y wget
33-
3429
# Clean up
3530
RUN apt-get autoremove -y && \
3631
rm -rf /var/lib/apt/lists/*

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ jobs:
6464
EOF
6565
- run:
6666
name: Check that Bazel BUILD files are up-to-date
67-
command: 'test -z "$(bazel run //:gazelle_diff)" ||
68-
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle_fix\`" >&2; exit 1)'
67+
command: 'bazel run //:gazelle ||
68+
(echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle\`" >&2; exit 1)'
6969
- run:
7070
name: Run tests with Bazel
7171
command: bazel test //...

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ docker run -v $(pwd):/src/grpc-gateway --rm jfbrandhorst/grpc-gateway-build-env
2929
make realclean && \
3030
make examples SWAGGER_CODEGEN="${SWAGGER_CODEGEN}"'
3131
docker run -itv $(pwd):/grpc-gateway -w /grpc-gateway --entrypoint /bin/bash --rm \
32-
l.gcr.io/google/bazel -c 'bazel run :gazelle_fix; bazel run :buildifier'
32+
l.gcr.io/google/bazel -c 'bazel run :gazelle; bazel run :buildifier'
3333
```
3434

3535
If this has resulted in some file changes in the repo, please ensure you check those in with your merge request.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ $(RESPONSE_BODY_EXAMPLE_SRCS): $(RESPONSE_BODY_EXAMPLE_SPEC)
177177
$(EXAMPLE_CLIENT_DIR)/responsebody/git_push.sh
178178

179179
examples: $(EXAMPLE_DEPSRCS) $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_CLIENT_SRCS)
180+
find -type f -name *.go -exec sed -s -i 's;github.com/go-resty/resty;gopkg.in/resty.v1;g' {} +
180181
test: examples
181182
go test -race ...
182183
go test -race examples/integration -args -network=unix -endpoint=test.sock

WORKSPACE

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ go_rules_dependencies()
2121

2222
go_register_toolchains()
2323

24-
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
24+
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
2525

2626
gazelle_dependencies()
2727

28-
load("@bazel_gazelle//:deps.bzl", "go_repository")
29-
3028
# Also define in Gopkg.toml
3129
go_repository(
3230
name = "org_golang_google_genproto",
@@ -43,9 +41,9 @@ go_repository(
4341

4442
# Also define in Gopkg.toml
4543
go_repository(
46-
name = "com_github_go_resty_resty",
47-
commit = "f8815663de1e64d57cdd4ee9e2b2fa96977a030e",
48-
importpath = "github.com/go-resty/resty",
44+
name = "in_gopkg_resty_v1",
45+
commit = "fa5875c0caa5c260ab78acec5a244215a730247f",
46+
importpath = "gopkg.in/resty.v1",
4947
)
5048

5149
# Also define in Gopkg.toml

examples/clients/abe/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ go_library(
3030
"//examples/proto/examplepb:go_default_library",
3131
"//examples/proto/pathenum:go_default_library",
3232
"//runtime:go_default_library",
33-
"@com_github_go_resty_resty//:go_default_library",
33+
"@in_gopkg_resty_v1//:go_default_library",
3434
],
3535
)

examples/clients/abe/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/clients/echo/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ go_library(
1313
"examplepb_simple_message.go",
1414
],
1515
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/echo",
16-
deps = ["@com_github_go_resty_resty//:go_default_library"],
16+
deps = ["@in_gopkg_resty_v1//:go_default_library"],
1717
)

examples/clients/echo/api_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"strings"
1919
"net/url"
2020
"io/ioutil"
21-
"github.com/go-resty/resty"
21+
"gopkg.in/resty.v1"
2222
)
2323

2424
type APIClient struct {

examples/clients/responsebody/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ go_library(
1919
],
2020
importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/clients/responsebody",
2121
visibility = ["//visibility:public"],
22-
deps = ["@com_github_go_resty_resty//:go_default_library"],
22+
deps = ["@in_gopkg_resty_v1//:go_default_library"],
2323
)

0 commit comments

Comments
 (0)