blob: 8a9d23cc473192b2bc24ffaa74994164bd1550e0 [file] [log] [blame]
Klaus Aehlig8221b232017-01-19 15:41:10 +00001#!/usr/bin/env bash
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +00002
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00003# Copyright 2015 The Bazel Authors. All rights reserved.
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
Philipp Wollermanna5afe952016-06-21 14:58:09 +000017set -eu
18
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000019# A build status command to provide the package info generator with
20# the information about the commit being built
21
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000022SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
Damien Martin-Guillerezc3842df2015-08-18 12:07:47 +000023source "$(dirname ${SCRIPT_DIR})/release/common.sh"
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000024
25git_hash=$(git rev-parse --short HEAD)
26echo "RELEASE_GIT_HASH ${git_hash}"
Kristina Chodorow2b1763a2015-09-01 09:15:54 +000027url="${GIT_REPOSITORY_URL:-https://github.com/bazelbuild/bazel}"
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000028echo "RELEASE_COMMIT_URL ${url}/commit/${git_hash}"
29if [ -n "${BUILT_BY-}" ]; then
30 echo "RELEASE_BUILT_BY ${BUILT_BY}"
31fi
32if [ -n "${BUILD_LOG-}" ]; then
33 echo "RELEASE_BUILD_LOG ${BUILD_LOG}"
34fi
Damien Martin-Guillerez0d352612016-12-02 13:48:14 +000035release_name=$(get_full_release_name)
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000036if [ -n "${release_name}" ]; then
Damien Martin-Guillerez0d352612016-12-02 13:48:14 +000037 echo "RELEASE_NAME ${release_name}"
38 echo "RELEASE_NOTES $(get_full_release_notes | tr '\n' '\f')"
Damien Martin-Guillerezab13f682015-07-28 08:19:32 +000039fi