Skip to content

Commit 6e0afc0

Browse files
Simplify variable name
1 parent bf57616 commit 6e0afc0

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,22 @@ jobs:
9494
PIP_INSTALL_DEFAULT_FLAGS=${{ steps.determine_pip_install_default_flags.outputs.pip_install_default_flags }}
9595
PACKAGE_NAME="pusimp"
9696
if [[ "${INDEX}" == "TestPyPI" ]]; then
97-
INDEX_REPOSITORY_URL=https://test.pypi.org
97+
INDEX_URL=https://test.pypi.org
9898
elif [[ "${INDEX}" == "PyPI" ]]; then
99-
INDEX_REPOSITORY_URL=https://pypi.org
99+
INDEX_URL=https://pypi.org
100100
else
101101
echo "Invalid package index" && exit 1
102102
fi
103103
COUNTER=0
104104
INDEX_VERSION_FOUND=0
105105
while [[ ${INDEX_VERSION_FOUND} -ne 1 ]]; do
106-
pip install ${PIP_INSTALL_DEFAULT_FLAGS} --no-cache-dir --index-url ${INDEX_REPOSITORY_URL}/simple/ ${PACKAGE_NAME}== 2> all_${PACKAGE_NAME}_versions || true
106+
pip install ${PIP_INSTALL_DEFAULT_FLAGS} --no-cache-dir --index-url ${INDEX_URL}/simple/ ${PACKAGE_NAME}== 2> all_${PACKAGE_NAME}_versions || true
107107
if grep -q ${INDEX_VERSION} all_${PACKAGE_NAME}_versions; then
108108
INDEX_VERSION_FOUND=1
109109
fi
110-
[[ ${INDEX_VERSION_FOUND} -ne 1 && ${COUNTER} -eq 5 ]] && echo "Giving up on finding version ${INDEX_VERSION} on ${INDEX_REPOSITORY_URL}" && exit 1
111-
[[ ${INDEX_VERSION_FOUND} -ne 1 ]] && echo "Cannot find version ${INDEX_VERSION} on ${INDEX_REPOSITORY_URL}, attempt ${COUNTER}: trying again after a short pause" && sleep 10
112-
[[ ${INDEX_VERSION_FOUND} -eq 1 ]] && echo "Found version ${INDEX_VERSION} on ${INDEX_REPOSITORY_URL}, attempt ${COUNTER}"
110+
[[ ${INDEX_VERSION_FOUND} -ne 1 && ${COUNTER} -eq 5 ]] && echo "Giving up on finding version ${INDEX_VERSION} on ${INDEX_URL}" && exit 1
111+
[[ ${INDEX_VERSION_FOUND} -ne 1 ]] && echo "Cannot find version ${INDEX_VERSION} on ${INDEX_URL}, attempt ${COUNTER}: trying again after a short pause" && sleep 10
112+
[[ ${INDEX_VERSION_FOUND} -eq 1 ]] && echo "Found version ${INDEX_VERSION} on ${INDEX_URL}, attempt ${COUNTER}"
113113
COUNTER=$((COUNTER+1))
114114
done
115115
shell: bash

.github/workflows/pypi.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ jobs:
2525
run: |
2626
if [[ -z "${{ (inputs || github.event.inputs).index }}" ]]; then
2727
echo "index=TestPyPI" >> ${GITHUB_OUTPUT}
28-
echo "index_repository_url=https://test.pypi.org" >> ${GITHUB_OUTPUT}
28+
echo "index_url=https://test.pypi.org" >> ${GITHUB_OUTPUT}
2929
else
3030
INDEX=${{ (inputs || github.event.inputs).index }}
3131
echo "index=${INDEX}" >> ${GITHUB_OUTPUT}
3232
if [[ "${INDEX}" == "TestPyPI" ]]; then
33-
echo "index_repository_url=https://test.pypi.org" >> ${GITHUB_OUTPUT}
33+
echo "index_url=https://test.pypi.org" >> ${GITHUB_OUTPUT}
3434
elif [[ "${INDEX}" == "PyPI" ]]; then
35-
echo "index_repository_url=https://pypi.org" >> ${GITHUB_OUTPUT}
35+
echo "index_url=https://pypi.org" >> ${GITHUB_OUTPUT}
3636
else
3737
echo "Invalid package index" && exit 1
3838
fi
3939
fi
4040
shell: bash
4141
outputs:
4242
index: ${{ steps.determine_index.outputs.index }}
43-
index_repository_url: ${{ steps.determine_index.outputs.index_repository_url }}
43+
index_url: ${{ steps.determine_index.outputs.index_url }}
4444

4545
build_distributions:
4646
needs: [process_inputs]
@@ -89,7 +89,7 @@ jobs:
8989
steps:
9090
- name: Report version and index which will be used
9191
run: |
92-
echo "Publishing version ${{ needs.build_distributions.outputs.version }} on ${{ needs.process_inputs.outputs.index }} (repository URL: ${{ needs.process_inputs.outputs.index_repository_url }})."
92+
echo "Publishing version ${{ needs.build_distributions.outputs.version }} on ${{ needs.process_inputs.outputs.index }} (index URL: ${{ needs.process_inputs.outputs.index_url }})."
9393
- name: Download distributions from artifacts
9494
uses: actions/download-artifact@v3
9595
with:
@@ -98,7 +98,7 @@ jobs:
9898
- name: Publish package distributions
9999
uses: pypa/gh-action-pypi-publish@release/v1
100100
with:
101-
repository-url: ${{ needs.process_inputs.outputs.index_repository_url }}/legacy/
101+
repository-url: ${{ needs.process_inputs.outputs.index_url }}/legacy/
102102

103103
test:
104104
needs: [process_inputs, build_distributions, publish]

0 commit comments

Comments
 (0)