Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Commit

Permalink
Set IFS only locally for read in deploy_documentation_tags.sh (#1378)
Browse files Browse the repository at this point in the history
* Set IFS only locally for read

Previously IFS was set for the whole bash setting, which later affected
the word splitting when the secrets were read from the variables and
split into the openssl command.

This also tidies up the array reading - previously, the `VERSION`
variable was an array (so `echo $VERSION` would be equivalent to
`echo ${VERSION[0]}`), and it was passed to `cut`, which isn't
necessary, since it was already split.

* Include major.minor versioning in path
  • Loading branch information
jakelishman authored Dec 10, 2021
1 parent 3bc1917 commit 2c1db98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/deploy_documentation_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ echo "show current dir: "
pwd

CURRENT_TAG=`git describe --abbrev=0`
IFS='.'
read -ra VERSION <<< "$CURRENT_TAG"
STABLE_VERSION=`echo $VERSION | cut -d "." -f -2`
IFS=. read -ra VERSION <<< "$CURRENT_TAG"
STABLE_VERSION="${VERSION[0]}.${VERSION[1]}"

# Build the documentation.
tox -edocs -- -D content_prefix=documentation/stable/"$STABLE_VERSION" -j auto
Expand Down

0 comments on commit 2c1db98

Please sign in to comment.