Skip to content

Commit 4f5db55

Browse files
committed
Merge branch 'main' into release/0.5
2 parents c3d9c05 + a100b0d commit 4f5db55

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.github/workflows/ci_cd.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ jobs:
507507
runs-on:
508508
group: ansys-network
509509
labels: [self-hosted, Windows, signtool]
510+
env:
511+
REUSE_LAST_ARTIFACTS: ${{ vars.REUSE_LAST_ARTIFACTS == 1 }}
510512

511513
steps:
512514
- name: Check out repository pyansys-geometry-binaries
@@ -515,11 +517,28 @@ jobs:
515517
repository: 'ansys/pyansys-geometry-binaries'
516518
token: ${{ secrets.BINARIES_TOKEN }}
517519

518-
- name: Download binaries
520+
- name: Download binaries (if conditions met)
521+
if: env.REUSE_LAST_ARTIFACTS == 'false'
519522
run: |
520523
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerWindows.zip --output windows-binaries.zip
521524
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerLinux.zip --output linux-binaries.zip
522525
526+
- name: Reuse last binaries (if conditions met)
527+
if: env.REUSE_LAST_ARTIFACTS == 'true'
528+
env:
529+
VERSION_WITH_PREFIX: ${{ github.ref_name }}
530+
run: |
531+
# We are on a Windows machine. We need to copy the binaries from the previous tag,
532+
# based on the current tag. We will also remove the trailing "v" from the tag. This will give
533+
# us the folder from where we need to copy the binaries.
534+
$env:VERSION=$env:VERSION_WITH_PREFIX.substring(1)
535+
$env:PREVIOUS_VERSION=$env:VERSION.substring(0, $env:VERSION.Length - 1)
536+
$env:PREVIOUS_PATCH_VERSION_NUMBER=$env:VERSION.substring($env:VERSION.Length - 1)
537+
$env:PREVIOUS_PATCH_VERSION_NUMBER=[int]$env:PREVIOUS_PATCH_VERSION_NUMBER - 1
538+
$env:PREVIOUS_VERSION=$env:PREVIOUS_VERSION + $env:PREVIOUS_PATCH_VERSION_NUMBER
539+
cp ./$env:PREVIOUS_VERSION/windows-binaries.zip windows-binaries.zip
540+
cp ./$env:PREVIOUS_VERSION/linux-binaries.zip linux-binaries.zip
541+
523542
- name: Upload Windows binaries as workflow artifacts
524543
uses: actions/upload-artifact@v4
525544
with:

doc/source/changelog.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ This document contains the release notes for the PyAnsys Geometry project.
99
1010
.. towncrier release notes start
1111
12-
`0.5.2 <https://github.com/ansys/pyansys-geometry/releases/tag/v0.5.2>`_ - 2024-04-26
12+
`0.5.2 <https://github.com/ansys/pyansys-geometry/releases/tag/v0.5.2>`_ - 2024-04-29
1313
=====================================================================================
1414

15+
Added
16+
^^^^^
17+
18+
- feat: add semver to intersphinx `#1173 <https://github.com/ansys/pyansys-geometry/pull/1173>`_
19+
20+
1521
Changed
1622
^^^^^^^
1723

1824
- chore: update CHANGELOG for v0.5.1 `#1165 <https://github.com/ansys/pyansys-geometry/pull/1165>`_
1925
- chore: bump version to v0.6.dev0 `#1166 <https://github.com/ansys/pyansys-geometry/pull/1166>`_
26+
- chore: update CHANGELOG for v0.5.2 `#1172 <https://github.com/ansys/pyansys-geometry/pull/1172>`_
27+
- fix: allow to reuse last release binaries (if requested) `#1174 <https://github.com/ansys/pyansys-geometry/pull/1174>`_
2028

2129

2230
Fixed

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def intersphinx_pyansys_geometry(switcher_version: str):
184184
"beartype": ("https://beartype.readthedocs.io/en/stable/", None),
185185
"docker": ("https://docker-py.readthedocs.io/en/stable/", None),
186186
"pypim": ("https://pypim.docs.pyansys.com/version/stable", None),
187+
"semver": ("https://python-semver.readthedocs.io/en/latest/", None),
187188
}
188189

189190
# Conditional intersphinx mapping

src/ansys/geometry/core/connection/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def backend_version(self) -> semver.Version:
223223
224224
Returns
225225
-------
226-
semver.Version
226+
~semver.Version
227227
Backend version.
228228
"""
229229
return self._backend_version

0 commit comments

Comments
 (0)