diff options
author | Philipp Wollermann <philwo@google.com> | 2016-08-19 10:45:28 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-08-19 10:47:46 +0000 |
commit | 9d9657b089bde11071d558e65f4b3b87d8a765d3 (patch) | |
tree | 3739f270d0e24f30d3c2a6d59ac5bc7cd93ccc26 | |
parent | f9fa99d0c1a25d0f7c2753043c5f88cce2cac255 (diff) |
Fix Bazel CI by appending the newline to WORKSPACE, which got lost in commit bfaff29b1bafd7892a2197b7cf826e1be0ff3927.
Without the newline, our bazel/scripts/ci/build.sh will append an android_sdk_repository() rule into the file in such a way, that it produces a syntax error.
Also fix the build.sh script to be more resilient and not actually require the newline.
--
MOS_MIGRATED_REVID=130737331
-rw-r--r-- | WORKSPACE | 2 | ||||
-rwxr-xr-x | scripts/ci/build.sh | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -51,4 +51,4 @@ docker_repository() bind(name = "xcrunwrapper", actual = "@bazel_tools//tools/objc:xcrunwrapper") bind(name = "protobuf/java_runtime", actual = "//third_party/protobuf:protobuf") -bind(name = "protobuf/javalite_runtime", actual = "//third_party/protobuf:protobuf-lite")
\ No newline at end of file +bind(name = "protobuf/javalite_runtime", actual = "//third_party/protobuf:protobuf-lite") diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index e98b58bad8..70e1d895b3 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -69,6 +69,9 @@ function setup_android_repositories() { cp WORKSPACE WORKSPACE.bak trap '[ -f WORKSPACE.bak ] && rm WORKSPACE && mv WORKSPACE.bak WORKSPACE' \ EXIT + # Make sure that WORKSPACE ends with a newline, otherwise we'll end up with + # a syntax error. + echo >>WORKSPACE cat >>WORKSPACE <<EOF android_sdk_repository( name = "androidsdk", |