Skip to content

Commit

Permalink
Allow specification of bazel target for bootstrap.
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=108500888
  • Loading branch information
aragos authored and philwo committed Nov 24, 2015
1 parent 1b2e3e3 commit 7c507be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,24 @@ function get_outputs_sum() {
function bootstrap_test() {
local BAZEL_BIN=$1
local BAZEL_SUM=$2
local BAZEL_TARGET=${3:-//src:bazel}
[ -x "${BAZEL_BIN}" ] || fail "syntax: bootstrap bazel-binary"
run_silent ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} clean \
--expunge || return $?
run_silent ${BAZEL_BIN} --nomaster_bazelrc --bazelrc=${BAZELRC} build \
${BAZEL_ARGS} \
--fetch --nostamp \
--javacopt="-source ${JAVA_VERSION} -target ${JAVA_VERSION}" \
//src:bazel || return $?
${BAZEL_TARGET} || return $?
if [ -n "${BAZEL_SUM}" ]; then
cat bazel-genfiles/src/java.version >${BAZEL_SUM}
get_outputs_sum >> ${BAZEL_SUM} || return $?
fi
if [ -z "${BOOTSTRAP:-}" ]; then
tempdir
BOOTSTRAP=${NEW_TMPDIR}/bazel
cp -f bazel-bin/src/bazel $BOOTSTRAP
local FILE=bazel-bin/${BAZEL_TARGET##//}
cp -f ${FILE/:/\/} $BOOTSTRAP
chmod +x $BOOTSTRAP
fi
}

0 comments on commit 7c507be

Please sign in to comment.