Skip to content

Commit 847be1f

Browse files
committed
fix(ci): select only the versioned codeanalyzer jar in the release workflow
The codeanalyzer-java release has two .jar assets (codeanalyzer-<v>.jar and an unversioned codeanalyzer.jar), so the 'endswith(".jar")' jq selector returned both URLs; wget then got a two-line argument and failed (exit 8), breaking the 1.2.0 release at the jar-injection step. Select only codeanalyzer-<version>.jar.
1 parent 253d278 commit 847be1f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ jobs:
5252
5353
- name: Inject the latest Code Analyzer JAR
5454
run: |
55-
CODE_ANALYZER_URL=$(curl -s https://api.github.com/repos/codellm-devkit/codeanalyzer-java/releases/latest | jq -r '.assets[] | select(.name | endswith(".jar")) | .browser_download_url')
55+
# The release has multiple .jar assets (the versioned codeanalyzer-<v>.jar and an
56+
# unversioned codeanalyzer.jar) — select only the versioned one so $CODE_ANALYZER_URL
57+
# is a single URL.
58+
CODE_ANALYZER_URL=$(curl -s https://api.github.com/repos/codellm-devkit/codeanalyzer-java/releases/latest | jq -r '.assets[] | select(.name | test("^codeanalyzer-[0-9].*\\.jar$")) | .browser_download_url')
5659
echo "Downloading: $CODE_ANALYZER_URL"
5760
wget -q "$CODE_ANALYZER_URL"
5861
mkdir -p ${{ github.workspace }}/cldk/analysis/java/codeanalyzer/jar/

0 commit comments

Comments
 (0)