Skip to content

Commit 0abfa72

Browse files
committed
Merge branch 'main' into release/server/1.2.0
2 parents 90517d8 + 60e6bfb commit 0abfa72

File tree

13 files changed

+64
-580
lines changed

13 files changed

+64
-580
lines changed

.claude/commands/update-version.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Update the Pathling core version across all required files and commit the
2+
change. The new version is: $ARGUMENTS
3+
4+
Read the "Updating the version" section of `RELEASE_CHECKLIST.md` to determine
5+
which files to update. Read the root `pom.xml` to determine the current
6+
version.
7+
8+
If the new version ends with `-SNAPSHOT`, update only the POM files. If it is a
9+
release version (no `-SNAPSHOT` suffix), also update the release-only files. For
10+
release-only files, replace the previous release version (the version currently
11+
in those files) with the new version.
12+
13+
After making all changes, stage the modified files and commit with the message:
14+
15+
```
16+
chore: Update core version to <version>
17+
```

.githooks/pre-commit

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,37 @@ command_exists() {
2121
command -v "$1" >/dev/null 2>&1
2222
}
2323

24+
# Find a project-local Node binary by walking up from a file's directory.
25+
# Falls back to the global binary if no local installation is found.
26+
find_node_bin() {
27+
local file="$1"
28+
local bin_name="$2"
29+
local dir
30+
31+
dir=$(dirname "$file")
32+
while [ "$dir" != "." ] && [ "$dir" != "/" ]; do
33+
if [ -x "$dir/node_modules/.bin/$bin_name" ]; then
34+
echo "$dir/node_modules/.bin/$bin_name"
35+
return 0
36+
fi
37+
dir=$(dirname "$dir")
38+
done
39+
40+
# Check the repo root.
41+
if [ -x "node_modules/.bin/$bin_name" ]; then
42+
echo "node_modules/.bin/$bin_name"
43+
return 0
44+
fi
45+
46+
# Fall back to the global binary.
47+
if command_exists "$bin_name"; then
48+
echo "$bin_name"
49+
return 0
50+
fi
51+
52+
return 1
53+
}
54+
2455
# Format a file and re-stage it if modified.
2556
format_and_restage() {
2657
local file="$1"
@@ -55,22 +86,22 @@ for FILE in $STAGED_FILES; do
5586

5687
case "$EXT" in
5788
js|jsx|ts|tsx|json|md|markdown)
58-
if ! command_exists prettier; then
89+
PRETTIER=$(find_node_bin "$FILE" "prettier") || {
5990
echo "Error: prettier is not installed. Please install it with: bun add -g prettier"
6091
exit 1
61-
fi
62-
format_and_restage "$FILE" prettier --write "$FILE"
92+
}
93+
format_and_restage "$FILE" "$PRETTIER" --write "$FILE"
6394
;;
6495
yaml|yml)
6596
# Skip Helm templates (contain Go template syntax that Prettier cannot parse).
6697
if [[ "$FILE" == */templates/*.yaml || "$FILE" == */templates/*.yml ]]; then
6798
continue
6899
fi
69-
if ! command_exists prettier; then
100+
PRETTIER=$(find_node_bin "$FILE" "prettier") || {
70101
echo "Error: prettier is not installed. Please install it with: bun add -g prettier"
71102
exit 1
72-
fi
73-
format_and_restage "$FILE" prettier --write "$FILE"
103+
}
104+
format_and_restage "$FILE" "$PRETTIER" --write "$FILE"
74105
;;
75106
java)
76107
if ! command_exists google-java-format; then

encoders/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<parent>
3232
<groupId>au.csiro.pathling</groupId>
3333
<artifactId>pathling</artifactId>
34-
<version>9.4.0</version>
34+
<version>9.5.0-SNAPSHOT</version>
3535
</parent>
3636
<artifactId>encoders</artifactId>
3737
<packaging>jar</packaging>

fhirpath/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>au.csiro.pathling</groupId>
2626
<artifactId>pathling</artifactId>
27-
<version>9.4.0</version>
27+
<version>9.5.0-SNAPSHOT</version>
2828
</parent>
2929
<artifactId>fhirpath</artifactId>
3030
<packaging>jar</packaging>

lib/R/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>au.csiro.pathling</groupId>
2626
<artifactId>pathling</artifactId>
27-
<version>9.4.0</version>
27+
<version>9.5.0-SNAPSHOT</version>
2828
<relativePath>../../pom.xml</relativePath>
2929
</parent>
3030
<artifactId>r</artifactId>

lib/python/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>au.csiro.pathling</groupId>
2626
<artifactId>pathling</artifactId>
27-
<version>9.4.0</version>
27+
<version>9.5.0-SNAPSHOT</version>
2828
<relativePath>../../pom.xml</relativePath>
2929
</parent>
3030
<artifactId>python</artifactId>

library-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<artifactId>pathling</artifactId>
2727
<groupId>au.csiro.pathling</groupId>
28-
<version>9.4.0</version>
28+
<version>9.5.0-SNAPSHOT</version>
2929
</parent>
3030
<artifactId>library-api</artifactId>
3131
<packaging>jar</packaging>

library-runtime/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<artifactId>pathling</artifactId>
2727
<groupId>au.csiro.pathling</groupId>
28-
<version>9.4.0</version>
28+
<version>9.5.0-SNAPSHOT</version>
2929
</parent>
3030
<artifactId>library-runtime</artifactId>
3131
<packaging>jar</packaging>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<modelVersion>4.0.0</modelVersion>
2323
<groupId>au.csiro.pathling</groupId>
2424
<artifactId>pathling</artifactId>
25-
<version>9.4.0</version>
25+
<version>9.5.0-SNAPSHOT</version>
2626
<packaging>pom</packaging>
2727

2828
<name>Pathling</name>

0 commit comments

Comments
 (0)