Skip to content

Commit 7891267

Browse files
committed
FIX: curl scripts from right branch
1 parent ca03563 commit 7891267

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc-deploy-stable/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ runs:
6464
# Filter out the major and minor version numbers
6565
major=$(echo $PRELIMINARY_VERSION | cut -d. -f1)
6666
minor=$(echo $PRELIMINARY_VERSION | cut -d. -f2)
67+
patch=$(echo $PRELIMINARY_VERSION | cut -d. -f3)
68+
echo "VERSION_MAJOR=$major" >> $GITHUB_ENV
69+
echo "VERSION_MINOR=$major" >> $GITHUB_ENV
70+
echo "VERSION_PATCH=$major" >> $GITHUB_ENV
6771
folder=release/$major.$minor
6872
echo "Folder was found to be $folder"
6973
# Create a new folder for the version (remove existing one if required)
@@ -97,7 +101,9 @@ runs:
97101
if: env.ACCEPTED_FORMAT == 'true'
98102
shell: bash
99103
run: |
100-
curl https://raw.githubusercontent.com/pyansys/actions/main/scripts/version_mapper.py -o version_mapper.py
104+
# Filter out desired scripts branch
105+
if [[ "${{ env.VERSION_MAJOR }}" == dev* ] then; scripts_branch=main; else scripts_branch=release/${{ env.VERSION }}; fi
106+
curl https://raw.githubusercontent.com/pyansys/actions/$scripts_branch/scripts/version_mapper.py -o version_mapper.py
101107
102108
- name: "Update the version JSON file"
103109
if: env.ACCEPTED_FORMAT == 'true'

0 commit comments

Comments
 (0)