Skip to content

Commit 0ff3312

Browse files
ci: make sure it is a tagged build before doing tagged things
1 parent 6017f7e commit 0ff3312

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

scripts/circle/post-test.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,22 @@ fi
2626

2727
# For a tagged build, we will build the docs for the associated module.
2828
# Otherwise, it will build for master.
29-
export TAGGED_MODULE_NAME=$(node -p "process.env.CIRCLE_TAG.replace(/-\d.*/, '')")
30-
export TAGGED_MODULE_VERSION=${CIRCLE_TAG/*-}
31-
32-
if [ "${CIRCLE_TAG:0:1}" == "v" ]
29+
if [ "${CIRCLE_TAG}" != "" ]
3330
then
34-
export TAGGED_MODULE_NAME="google-cloud"
35-
export TAGGED_MODULE_VERSION=${CIRCLE_TAG:1}
36-
fi
31+
export TAGGED_MODULE_NAME=$(node -p "process.env.CIRCLE_TAG.replace(/-\d.*/, '')")
32+
export TAGGED_MODULE_VERSION=${CIRCLE_TAG/*-}
3733

38-
if [ "${TAGGED_MODULE_NAME:0:6}" == "common" ]
39-
then
40-
echo "This module does not require documentation to be built."
41-
exit 0
34+
if [ "${CIRCLE_TAG:0:1}" == "v" ]
35+
then
36+
export TAGGED_MODULE_NAME="google-cloud"
37+
export TAGGED_MODULE_VERSION=${CIRCLE_TAG:1}
38+
fi
39+
40+
if [ "${TAGGED_MODULE_NAME:0:6}" == "common" ]
41+
then
42+
echo "This module does not require documentation to be built."
43+
exit 0
44+
fi
4245
fi
4346

4447
set +e # allows `git` commands during prepare-ghpages to fail

0 commit comments

Comments
 (0)