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
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index e98b58b..70e1d89 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -69,6 +69,9 @@
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",