diff options
author | Nikita Shulga <nshulga@fb.com> | 2021-12-14 09:24:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 09:24:18 -0800 |
commit | 71f889c7d265b9636b93ede9d651c0a9c4bee191 (patch) | |
tree | 1d69252ecc580b52929e0121ec71e20d566ff8f5 | |
parent | 932ac7bd713fbac63d96d86571ba4529ad0423f0 (diff) | |
download | pytorch-71f889c7d265b9636b93ede9d651c0a9c4bee191.tar.gz pytorch-71f889c7d265b9636b93ede9d651c0a9c4bee191.tar.bz2 pytorch-71f889c7d265b9636b93ede9d651c0a9c4bee191.zip |
fix formatting CIRCLE_TAG when building docs (#67026) (#69876)
Summary:
Similar to pytorch/text#1416
malfet, brianjo
The previous code failed when tags changed from `v0.9.0` to `v0.10.0`. I tested this offline, it would be nice to somehow be actually tag the repo and see that this adds the correct documentation directory to the pytorch/pytorch.github.io repo.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67026
Reviewed By: saketh-are
Differential Revision: D31843381
Pulled By: malfet
fbshipit-source-id: 21526ad9ed4c1751c2d7f6d621da305f166a7f55
Co-authored-by: mattip <matti.picus@gmail.com>
-rw-r--r-- | .circleci/config.yml | 5 | ||||
-rw-r--r-- | .circleci/verbatim-sources/job-specs/job-specs-custom.yml | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 0bd8e8e1a4..82121e367d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1311,7 +1311,8 @@ jobs: set -ex export COMMIT_DOCKER_IMAGE=${DOCKER_IMAGE}:build-${DOCKER_TAG}-${CIRCLE_SHA1} echo "DOCKER_IMAGE: "${COMMIT_DOCKER_IMAGE} - tag=${CIRCLE_TAG:1:5} + # turn v1.12.0rc3 into 1.12.0 + tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/') target=${tag:-master} echo "building for ${target}" time docker pull ${COMMIT_DOCKER_IMAGE} >/dev/null @@ -1356,6 +1357,8 @@ jobs: set -ex export COMMIT_DOCKER_IMAGE=${DOCKER_IMAGE}:build-${DOCKER_TAG}-${CIRCLE_SHA1} echo "DOCKER_IMAGE: "${COMMIT_DOCKER_IMAGE} + # turn v1.12.0rc3 into 1.12.0 + tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/') tag=${CIRCLE_TAG:1:5} target=${tag:-master} echo "building for ${target}" diff --git a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml index f82512236b..c5f5b2eb25 100644 --- a/.circleci/verbatim-sources/job-specs/job-specs-custom.yml +++ b/.circleci/verbatim-sources/job-specs/job-specs-custom.yml @@ -43,7 +43,8 @@ set -ex export COMMIT_DOCKER_IMAGE=${DOCKER_IMAGE}:build-${DOCKER_TAG}-${CIRCLE_SHA1} echo "DOCKER_IMAGE: "${COMMIT_DOCKER_IMAGE} - tag=${CIRCLE_TAG:1:5} + # turn v1.12.0rc3 into 1.12.0 + tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/') target=${tag:-master} echo "building for ${target}" time docker pull ${COMMIT_DOCKER_IMAGE} >/dev/null @@ -88,6 +89,8 @@ set -ex export COMMIT_DOCKER_IMAGE=${DOCKER_IMAGE}:build-${DOCKER_TAG}-${CIRCLE_SHA1} echo "DOCKER_IMAGE: "${COMMIT_DOCKER_IMAGE} + # turn v1.12.0rc3 into 1.12.0 + tag=$(echo $CIRCLE_TAG | sed -e 's/v*\([0-9.]*\).*/\1/') tag=${CIRCLE_TAG:1:5} target=${tag:-master} echo "building for ${target}" |