Skip to content

Commit

Permalink
Fix name collision in script (sigp#2678)
Browse files Browse the repository at this point in the history
## Issue Addressed

N/A

## Proposed Changes

We set a `$TAG` env variable in the github actions workflow, and then re-use this name in the `publish.sh` script. It makes this check `if [[ -z "$TAG" ]]` return true, when it should return false on the first time it's hit.

## Additional Info

N/A


Co-authored-by: realbigsean <[email protected]>
  • Loading branch information
realbigsean and realbigsean committed Oct 5, 2021
1 parent 7c88f58 commit 02a646a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/ci/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -e
USAGE="Publish a new release of a lighthouse crate
USAGE:
$(basename "$0") [OPTIONS] [CRATE_PATH] [CRATE] [TAG]
$(basename "$0") [OPTIONS] [CRATE_PATH] [CRATE] [TAG_NAME]
OPTIONS:
-v, --verbose Use verbose Cargo output
-d, --dry-run Perform a dry run (do not publish the release)
Expand Down Expand Up @@ -72,9 +72,9 @@ case "$1" in
CRATE_PATH="$1"
elif [ -z "$CRATE" ]; then
CRATE="$1"
elif [ -z "$TAG" ]; then
TAG="$1"
VERSION=$(sed -e 's#.*-v\([0-9]\)#\1#' <<< "$TAG")
elif [ -z "$TAG_NAME" ]; then
TAG_NAME="$1"
VERSION=$(sed -e 's#.*-v\([0-9]\)#\1#' <<< "$TAG_NAME")
else
echo "unknown positional argument \"$1\""
echo "$USAGE"
Expand Down

0 comments on commit 02a646a

Please sign in to comment.