Fix unreleased.sh (#3567)

* Fix unreleased.sh

The usage of `git log` to avoid printing the diff of each commit turned
out to cause the commit to be interpreted as a revision range reachable
from said commit, which breaks unreleased.sh. This commit reverts to
using `git show` but with `--quiet` to avoid printing the diff, as
originally planned.

* Update unreleased.sh

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>
This commit is contained in:
Stefano Baghino 2019-11-21 13:43:11 +01:00 committed by mergify[bot]
parent 147676d45c
commit e0b19a3c62

View File

@ -2,4 +2,7 @@
# Copyright (c) 2019 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
for SHA in $(git log --format=%H "$1"); do git log --format=%b "$SHA" | awk '/^$/{next} toupper($0) ~ /CHANGELOG_END/{flag=0; next} toupper($0) ~ /CHANGELOG_BEGIN/{flag=1; next} flag'; done
for SHA in $(git log --format=%H "$1"); do
git show --quiet --format=%b "$SHA" \
| awk '/^$/{next} toupper($0) ~ /CHANGELOG_END/{flag=0; next} toupper($0) ~ /CHANGELOG_BEGIN/{flag=1; next} flag'
done