Skip to content

Commit 337c36b

Browse files
committed
Build: join TOOL and VERSION with a - to simplify CircleCI routine
1 parent 130ff62 commit 337c36b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

scripts/compile_version_upload_s3.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# export AWS_SECRET_ACCESS_KEY=...
5050
# export AWS_BUILD_TOOLS_BUCKET=readthedocs(inc)-build-tools-prod
5151
#
52-
# ./compile_version_upload.sh $TOOL $VERSION
52+
# ./compile_version_upload.sh $TOOL-$VERSION
5353
#
5454
#
5555
# ONE-LINE COMMAND FROM UTIL01 PRODUCTION
@@ -67,12 +67,12 @@
6767
# AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
6868
# AWS_BUILD_TOOLS_BUCKET=$AWS_BUILD_TOOLS_BUCKET \
6969
# PATH=/home/docs/buildtools/bin:${PATH} \
70-
# /home/docs/checkouts/readthedocs.org/scripts/compile_version_upload_s3.sh $TOOL $VERSION"
70+
# /home/docs/checkouts/readthedocs.org/scripts/compile_version_upload_s3.sh $TOOL-$VERSION"
7171
#
7272
#
7373
# USAGE
7474
#
75-
# ./scripts/compile_version_upload.sh $TOOL $VERSION
75+
# ./scripts/compile_version_upload.sh $TOOL-$VERSION
7676
#
7777
# ARGUMENTS
7878
#
@@ -81,17 +81,18 @@
8181
#
8282
# EXAMPLES
8383
#
84-
# ./scripts/compile_version_upload.sh python 3.9.7
85-
# ./scripts/compile_version_upload.sh nodejs 14.17.6
84+
# ./scripts/compile_version_upload.sh python-3.9.7
85+
# ./scripts/compile_version_upload.sh nodejs-14.17.6
8686

8787
set -e # Stop on errors
8888
set -x # Echo commands
8989

9090
# Define variables
9191
SLEEP=350 # Container timeout
9292
OS="${OS:-ubuntu-22.04}" # Docker image name
93-
TOOL=$1
94-
VERSION=$2
93+
94+
TOOL=$(echo $1 | cut -d- -f1)
95+
VERSION=$(echo $1 | cut -d- -f2-)
9596

9697
# https://stackoverflow.com/questions/59895/how-can-i-get-the-source-directory-of-a-bash-script-from-within-the-script-itsel
9798
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

0 commit comments

Comments
 (0)