Skip to content

Commit c5d1773

Browse files
authored
fix: update set_dev_version.py and fix minimum clearance line unit test (#330)
1 parent de0fea6 commit c5d1773

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

ci/scripts/set_dev_version.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,21 @@ def main():
7979
_, last_dev_tag = find_last_dev_tag()
8080
dev_distance = len(find_commits_since(last_dev_tag))
8181

82+
# Update workspace package version
8283
file_regex_replace(
8384
r'\nversion = "([0-9]+\.[0-9]+\.[0-9]+)"',
8485
f'\nversion = "\\1-alpha{dev_distance}"',
8586
src_path("Cargo.toml"),
8687
)
8788

89+
# Update workspace dependencies versions to match the prerelease version
90+
# Matches both 'sedona' and 'sedona-*' packages (including digits like sedona-s2geography)
91+
file_regex_replace(
92+
r'(sedona(?:-[a-z0-9\-]+)?) = \{ version = "([0-9]+\.[0-9]+\.[0-9]+)", path',
93+
f'\\1 = {{ version = "\\2-alpha{dev_distance}", path',
94+
src_path("Cargo.toml"),
95+
)
96+
8897
with open(src_path("Cargo.toml"), "rb") as f:
8998
print(tomllib.load(f)["workspace"]["package"]["version"])
9099

python/sedonadb/tests/functions/test_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,8 +2278,8 @@ def test_st_minimum_clearance(eng, geom, expected):
22782278
"LINESTRING (0 0, 1 1)",
22792279
),
22802280
(
2281-
"MULTIPOLYGON(((0.5 0.5,0 0,0 1,0.5 0.5)),((0.5 0.5,1 1,1 0,0.5 0.5)),((2.5 2.5,2 2,2 3,2.5 2.5)),((2.5 2.5,3 3,3 2,2.5 2.5)))",
2282-
"LINESTRING (2.5 2.5, 3 2.5)",
2281+
"MULTIPOLYGON(((0.5 0.5,0 0,0 1,0.5 0.5)),((0.5 0.5,1 1,1 0,0.5 0.5)),((2.5 2.5,2 2,2 3,2.5 2.5)),((2.5 2.5,3.5 3.5,3.5 1.5,2.5 2.5)))",
2282+
"LINESTRING (2.5 2.5, 2 2.5)",
22832283
),
22842284
(
22852285
"POINT (1 1)",

0 commit comments

Comments
 (0)