Klaus Aehlig | 8221b23 | 2017-01-19 15:41:10 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 2 | |
Damien Martin-Guillerez | f88f4d8 | 2015-09-25 13:56:55 +0000 | [diff] [blame] | 3 | # Copyright 2015 The Bazel Authors. All rights reserved. |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 4 | # |
| 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 Wollermann | a5afe95 | 2016-06-21 14:58:09 +0000 | [diff] [blame] | 17 | set -eu |
| 18 | |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 19 | # A build status command to provide the package info generator with |
| 20 | # the information about the commit being built |
| 21 | |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 22 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
Damien Martin-Guillerez | c3842df | 2015-08-18 12:07:47 +0000 | [diff] [blame] | 23 | source "$(dirname ${SCRIPT_DIR})/release/common.sh" |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 24 | |
| 25 | git_hash=$(git rev-parse --short HEAD) |
| 26 | echo "RELEASE_GIT_HASH ${git_hash}" |
Kristina Chodorow | 2b1763a | 2015-09-01 09:15:54 +0000 | [diff] [blame] | 27 | url="${GIT_REPOSITORY_URL:-https://github.com/bazelbuild/bazel}" |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 28 | echo "RELEASE_COMMIT_URL ${url}/commit/${git_hash}" |
| 29 | if [ -n "${BUILT_BY-}" ]; then |
| 30 | echo "RELEASE_BUILT_BY ${BUILT_BY}" |
| 31 | fi |
| 32 | if [ -n "${BUILD_LOG-}" ]; then |
| 33 | echo "RELEASE_BUILD_LOG ${BUILD_LOG}" |
| 34 | fi |
Damien Martin-Guillerez | 0d35261 | 2016-12-02 13:48:14 +0000 | [diff] [blame] | 35 | release_name=$(get_full_release_name) |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 36 | if [ -n "${release_name}" ]; then |
Damien Martin-Guillerez | 0d35261 | 2016-12-02 13:48:14 +0000 | [diff] [blame] | 37 | echo "RELEASE_NAME ${release_name}" |
| 38 | echo "RELEASE_NOTES $(get_full_release_notes | tr '\n' '\f')" |
Damien Martin-Guillerez | ab13f68 | 2015-07-28 08:19:32 +0000 | [diff] [blame] | 39 | fi |