aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Damien Martin-Guillerez <dmarting@google.com>2017-01-26 22:52:29 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2017-01-26 23:05:39 +0000
commit930fa9b24cb7b1e516f92a200d9087fd3ba561e5 (patch)
tree303a1f464526e3100b568866f0694c55beac8d6d /scripts
parent8290d582f3ea816a73cf2a565acc7491e195d933 (diff)
Follow-up of commit dbdaf83fe5480179bf65b86421168a5dba0e2198: common.sh was not exported
This also make sure we list cherry-picks with long hash. -- PiperOrigin-RevId: 145724726 MOS_MIGRATED_REVID=145724726
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release/common.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/release/common.sh b/scripts/release/common.sh
index 7cea006a9e..7cd6d0b61e 100755
--- a/scripts/release/common.sh
+++ b/scripts/release/common.sh
@@ -50,8 +50,8 @@ function get_release_name() {
}
# Get the short hash of a commit
-function git_commit_shorthash() {
- git rev-parse --short "${1}"
+function git_commit_hash() {
+ git rev-parse "${1}"
}
# Get the subject (first line of the commit message) of a commit
@@ -111,7 +111,7 @@ function wrap_text() {
# message will be wrapped into 70 columns.
# + CHERRY_PICK2: commit message summary of the CHERRY_PICK2.
function create_revision_information() {
- echo "Baseline: $(git_commit_shorthash "${1}")"
+ echo "Baseline: $(git_commit_hash "${1}")"
local first=1
shift
while [ -n "${1-}" ]; do
@@ -119,11 +119,11 @@ function create_revision_information() {
echo -e "\nCherry picks:"
first=0
fi
- local hash="$(git_commit_shorthash "${1}")"
+ local hash="$(git_commit_hash "${1}")"
local subject="$(git_commit_subject $hash)"
- local lines=$(echo "$subject" | wrap_text 56) # 14 leading spaces.
- echo " + $hash: $lines" | head -1
- echo "$lines" | tail -n +2 | sed 's/^/ /'
+ local lines=$(echo "$subject" | wrap_text 65) # 5 leading spaces.
+ echo " + $hash:"
+ echo "$lines" | sed 's/^/ /'
shift
done
}