Temurin version incorrectly converted for setup-java 6.0.x

未關閉 適合新手
#1,270 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
82/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
github-actions, java, typescript
領域
ci-cd, devops

研究方向

從 src/distributions/base-installer.ts 的第 681-689 行附近開始,這裡的正規表示式會處理 Java 版本。使用 26.0.2.1+1 和 25.0.4.1+1 等 Temurin 版本重現該失敗,然後驗證 setup-java 能夠成功解析這些版本,且不會出現 SemVer 錯誤。

由索引模型根據 Issue 內容生成。

描述

bug

Description:
After upgrade from 5.7.0 to 6.0.0 and 6.0.1, I noticed that setup-java does not recognize Temurin's versions anymore (e.g. "26.0.2+10"). This leads to an "is not valid SemVer notation for a Java version" error.

The following regular expression does not not pick up Temurin's version correctly:

https://github.com/actions/setup-java/blob/1aa87b638dacaa70f1c903fa9ec9cbd91058e2ff/src/distributions/base-installer.ts#L681-L689

The issue seems to be similar to: https://github.com/actions/setup-java/issues/1267

Task version:
v6, v6.0.1

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

Expected behavior:
Successfully resolve Temurin version.

Actual behavior:
setup-java >= 6.0.0 returns

The string '26.0.2.1+1' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information

主要語言
TypeScript
星號
2k
分支
870
平均合併
3 小時 16 分鐘
30 天內合併 PR
11

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。