Skip to content

Commit

Permalink
fix: get the right version
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Mar 2, 2023
1 parent 393015a commit 1ef28a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/pythonpackage.yml
Expand Up @@ -38,8 +38,7 @@ jobs:
run: |
python -m venv /tmp/buildenv
source /tmp/buildenv/bin/activate
python -m pip install -U build "setuptools >= 45" wheel "setuptools_scm >= 6.2" \
setuptools_scm_git_archive pip twine docutils
python -m pip install -U build hatch hatchling pip twine docutils
python -m build -s -w
python -m twine check dist/mriqc-*
Expand All @@ -49,15 +48,15 @@ jobs:
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
TAG=${GITHUB_REF##*/}
fi
THISVERSION=$( python -m setuptools_scm )
THISVERSION=$( python -m hatch version )
THISVERSION=${TAG:-$THISVERSION}
echo "Expected VERSION: \"${THISVERSION}\""
echo "THISVERSION=${THISVERSION}" >> $GITHUB_ENV
- name: Install in confined environment [pip]
run: |
python -m venv /tmp/pip
source /tmp/pip/bin/activate
python -m pip install -U "setuptools >= 45" "setuptools_scm >= 6.2" "${{ matrix.pip }}"
python -m pip install -U hatch hatchling "${{ matrix.pip }}"
python -m pip install .
INSTALLED_VERSION=$(python -c 'import mriqc as qc; print(qc.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
Expand All @@ -67,7 +66,7 @@ jobs:
run: |
python -m venv /tmp/install_sdist
source /tmp/install_sdist/bin/activate
python -m pip install -U "setuptools >= 45" "${{ matrix.pip }}"
python -m pip install -U hatch hatchling "${{ matrix.pip }}"
python -m pip install /tmp/package/mriqc*.tar.gz
INSTALLED_VERSION=$(python -c 'import mriqc as qc; print(qc.__version__, end="")')
echo "VERSION: \"${THISVERSION}\""
Expand Down

0 comments on commit 1ef28a4

Please sign in to comment.