mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Declare variables separately when assigning the result of $()
This commit is contained in:
parent
1c7cc376d1
commit
75b87d159d
@ -51,12 +51,12 @@ function compileFull()
|
||||
|
||||
local files=("$@")
|
||||
|
||||
local stderr_path=$(mktemp)
|
||||
local stderr_path; stderr_path=$(mktemp)
|
||||
|
||||
set +e
|
||||
"$SOLC" "${args[@]}" "${files[@]}" >/dev/null 2>"$stderr_path"
|
||||
local exit_code=$?
|
||||
local errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|^ +--> |^ +\||^[0-9]+ +\|' < "$stderr_path")
|
||||
local errors; errors=$(grep -v -E 'Warning: This is a pre-release compiler version|Warning: Experimental features are turned on|pragma experimental ABIEncoderV2|^ +--> |^ +\||^[0-9]+ +\|' < "$stderr_path")
|
||||
set -e
|
||||
rm "$stderr_path"
|
||||
|
||||
|
@ -86,7 +86,7 @@ function process_tag() {
|
||||
local TAG=$1
|
||||
cd /src
|
||||
# Checkout the historic commit instead of the tag directly.
|
||||
local HISTORIC_COMMIT_HASH="$(grep "${TAG}+" /tmp/release_commit_list.txt | cut -d '+' -f 2 | cut -d '.' -f 2)"
|
||||
local HISTORIC_COMMIT_HASH; HISTORIC_COMMIT_HASH="$(grep "${TAG}+" /tmp/release_commit_list.txt | cut -d '+' -f 2 | cut -d '.' -f 2)"
|
||||
if [ "$(git cat-file -t "${HISTORIC_COMMIT_HASH}" 2>/dev/null)" == "commit" ]; then
|
||||
clean_git_checkout "$HISTORIC_COMMIT_HASH"
|
||||
else
|
||||
@ -103,7 +103,7 @@ function process_tag() {
|
||||
VERSION=$(echo "$TAG" | cut -d v -f 2)
|
||||
fi
|
||||
|
||||
local COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
||||
local COMMIT_HASH; COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
||||
local FULL_VERSION_SUFFIX="${TAG}+commit.${COMMIT_HASH}"
|
||||
local HISTORIC_VERSION_SUFFIX="${TAG}+commit.${HISTORIC_COMMIT_HASH}"
|
||||
|
||||
|
@ -121,8 +121,8 @@ function test_solc_behaviour()
|
||||
local stderr_expected="${7}"
|
||||
local stdout_expectation_file="${8}" # the file to write to when user chooses to update stdout expectation
|
||||
local stderr_expectation_file="${9}" # the file to write to when user chooses to update stderr expectation
|
||||
local stdout_path=$(mktemp)
|
||||
local stderr_path=$(mktemp)
|
||||
local stdout_path; stdout_path=$(mktemp)
|
||||
local stderr_path; stderr_path=$(mktemp)
|
||||
|
||||
trap "rm -f $stdout_path $stderr_path" EXIT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user