Skip to content

Commit

Permalink
rrenaming env yml file can be avoided if we move it to a temporary lc…
Browse files Browse the repository at this point in the history
…oation before copying
  • Loading branch information
niketagrawal committed Sep 30, 2024
1 parent 8f4d59d commit 9ba8ca4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ build:
jobs:
pre_install:
- LATEST_TAG=$(git describe --tags --abbrev=0) ; echo Downloading $LATEST_TAG ;
wget https://github.com/tudat-team/tudatpy/archive/refs/tags/$LATEST_TAG.zip; unzip $LATEST_TAG.zip; rm -rf docs/; LT=$(echo $LATEST_TAG | cut -c 2-); mv tudatpy-$LT/docs/ .
wget https://github.com/tudat-team/tudatpy/archive/refs/tags/$LATEST_TAG.zip; unzip $LATEST_TAG.zip;
mv docs/environment_readthedocs.yaml /tmp/environment_readthedocs.yaml;
rm -rf docs/; LT=$(echo $LATEST_TAG | cut -c 2-); mv tudatpy-$LT/docs/ .;
mv /tmp/environment_readthedocs.yaml docs/environment_readthedocs.yaml;
# The pre-install step enables building the docs on the latest tag
# instead of the latest commit. Since Read the Docs uses the latest
# tudatpy dev conda package to find the binaries (see docs/source/conf.
Expand All @@ -28,7 +31,14 @@ build:
# on the latest commit. The pre-install step replaces the docs/
# directory with the docs/ directory of the latest tag.

# The pre-install step does the following:
# Download and unzip the latest tag.
# Move the current environment_readthedocs.yaml file to a temporary location.
# Remove the current docs/ folder.
# Move the docs/ folder from the latest tag to the current location.
# Move the environment_readthedocs.yaml file back to the docs/ folder.

conda:
environment: docs/environment_readthedocs_unpinned.yaml
environment: docs/environment_readthedocs.yaml


File renamed without changes.

0 comments on commit 9ba8ca4

Please sign in to comment.