Skip to content

Commit 848d9bc

Browse files
authored
Merge pull request #7 from MetaMask/fix/dont-export-bash-variables
fix: dont export bash variables
2 parents 0e29c79 + 3215cc0 commit 848d9bc

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

run.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
set -x
44
set -e
55
set -u
6+
set -o pipefail
67

7-
export NEW_VERSION="${1}"
8-
export BRANCH_NAME="release-v${NEW_VERSION}"
9-
export GITHUB_ACTION_PATH="${2}"
10-
export RELEASE_BODY="$(awk -v version="${NEW_VERSION}" -f ${GITHUB_ACTION_PATH}/scripts/show-changelog.awk CHANGELOG.md)"
8+
NEW_VERSION="${1}"
9+
10+
if [[ -z $NEW_VERSION ]]; then
11+
echo "Error: No new version specified."
12+
exit 1
13+
fi
14+
15+
BRANCH_NAME="release-v${NEW_VERSION}"
16+
GITHUB_ACTION_PATH="${2}"
17+
RELEASE_BODY="$(awk -v version="${NEW_VERSION}" -f "${GITHUB_ACTION_PATH}"/scripts/show-changelog.awk CHANGELOG.md)"
1118

1219
git config user.name github-actions
1320
git config user.email [email protected]

0 commit comments

Comments
 (0)