Skip to content

Commit b83eb92

Browse files
committed
create_source_tarball.sh: Fail when commit_hash.txt is present instead of ignoring it
1 parent 2d18ab6 commit b83eb92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/create_source_tarball.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
set -euo pipefail
33

44
REPO_ROOT="$(dirname "$0")"/..
5+
# shellcheck source=scripts/common.sh
6+
source "${REPO_ROOT}/scripts/common.sh"
7+
58
cd "$REPO_ROOT"
69
version=$(scripts/get_version.sh)
710
commit_hash=$(git rev-parse --short=8 HEAD)
@@ -14,6 +17,11 @@ else
1417
version_string="${version}-nightly-${commit_date}-${commit_hash}"
1518
fi
1619

20+
# The only purpose of commit_hash.txt is to make it possible to build the compiler without git.
21+
# It is not meant as an override of the real hash.
22+
[[ ! -e commit_hash.txt ]] || \
23+
fail "commit_hash.txt is present in the repository root, but will not be used to override the commit hash for the source package."
24+
1725
TEMPDIR=$(mktemp -d -t "solc-src-tarball-XXXXXX")
1826
SOLDIR="${TEMPDIR}/solidity_${version_string}/"
1927
mkdir "$SOLDIR"

0 commit comments

Comments
 (0)