Skip to content

Commit 1d61154

Browse files
fix: replace hardcoded 1.0.0 version strings with CODEFLASH_RUNTIME_VERSION
Three places in maven_strategy.py had the version hardcoded instead of using the constant: the dependency snippet, the install-file command, and the system-scope replacement. This caused CI failures because the pom.xml dependency pointed to 1.0.0 while ~/.m2 had 1.0.1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b6f79d1 commit 1d61154

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

codeflash/languages/java/maven_strategy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262

6363
CODEFLASH_CACHE_DIR = Path.home() / ".cache" / "codeflash"
6464

65-
CODEFLASH_DEPENDENCY_SNIPPET = """\
65+
CODEFLASH_DEPENDENCY_SNIPPET = f"""\
6666
<dependency>
6767
<groupId>com.codeflash</groupId>
6868
<artifactId>codeflash-runtime</artifactId>
69-
<version>1.0.0</version>
69+
<version>{CODEFLASH_RUNTIME_VERSION}</version>
7070
<scope>test</scope>
7171
</dependency>
7272
</dependencies>"""
@@ -140,7 +140,7 @@ def install_codeflash_runtime(project_root: Path, runtime_jar_path: Path, mvn: s
140140
f"-Dfile={runtime_jar_path}",
141141
"-DgroupId=com.codeflash",
142142
"-DartifactId=codeflash-runtime",
143-
"-Dversion=1.0.0",
143+
f"-Dversion={CODEFLASH_RUNTIME_VERSION}",
144144
"-Dpackaging=jar",
145145
"-B",
146146
]
@@ -297,7 +297,7 @@ def replace_system_dep(match: re.Match[str]) -> str:
297297
"<dependency>\n"
298298
" <groupId>com.codeflash</groupId>\n"
299299
" <artifactId>codeflash-runtime</artifactId>\n"
300-
" <version>1.0.0</version>\n"
300+
f" <version>{CODEFLASH_RUNTIME_VERSION}</version>\n"
301301
" <scope>test</scope>\n"
302302
" </dependency>"
303303
)

0 commit comments

Comments
 (0)