fix(ci): keep alpha calculation CPS serializable
这个提交包含在:
父节点
fed3fd4fc4
当前提交
530e4503c4
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
@ -3,6 +3,7 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
NEXUS_REGISTRY = 'https://nexus.xuqinmin.com/repository/npm-hosted/'
|
NEXUS_REGISTRY = 'https://nexus.xuqinmin.com/repository/npm-hosted/'
|
||||||
|
NEXUS_READ_REGISTRY = 'https://nexus.xuqinmin.com/repository/npm/'
|
||||||
GIT_URL = 'https://xuqinmin.com/xuqmGroup/XuqmGroup-RNSDK.git'
|
GIT_URL = 'https://xuqinmin.com/xuqmGroup/XuqmGroup-RNSDK.git'
|
||||||
ANDROID_SDK_GIT_URL = 'https://xuqinmin.com/xuqmGroup/XuqmGroup-AndroidSDK.git'
|
ANDROID_SDK_GIT_URL = 'https://xuqinmin.com/xuqmGroup/XuqmGroup-AndroidSDK.git'
|
||||||
}
|
}
|
||||||
@ -85,21 +86,17 @@ pipeline {
|
|||||||
if (params.SNAPSHOT) {
|
if (params.SNAPSHOT) {
|
||||||
// SNAPSHOT:源码与 registry 都可能领先,必须取二者最大序号再递增。
|
// SNAPSHOT:源码与 registry 都可能领先,必须取二者最大序号再递增。
|
||||||
def localAlphaNum = 0
|
def localAlphaNum = 0
|
||||||
def localMatcher = (currentVer =~ /-alpha\.(\d+)$/)
|
if (currentVer.matches(/.*-alpha\.\d+$/)) {
|
||||||
if (localMatcher.find()) {
|
localAlphaNum = currentVer.tokenize('.').last().toInteger()
|
||||||
localAlphaNum = localMatcher.group(1).toInteger()
|
|
||||||
}
|
}
|
||||||
def remoteAlphaNum = 0
|
def remoteAlphaNum = 0
|
||||||
try {
|
try {
|
||||||
def remoteVer = bat(
|
def remoteVer = bat(
|
||||||
script: "@npm view ${pkg} dist-tags.alpha --registry %NEXUS_REGISTRY% 2>nul",
|
script: "@npm view ${pkg} dist-tags.alpha --registry %NEXUS_READ_REGISTRY% 2>nul",
|
||||||
returnStdout: true
|
returnStdout: true
|
||||||
).trim()
|
).trim()
|
||||||
if (remoteVer && remoteVer.matches(/.*-alpha\.\d+$/)) {
|
if (remoteVer && remoteVer.matches(/.*-alpha\.\d+$/)) {
|
||||||
def matcher = (remoteVer =~ /-alpha\.(\d+)$/)
|
remoteAlphaNum = remoteVer.tokenize('.').last().toInteger()
|
||||||
if (matcher.find()) {
|
|
||||||
remoteAlphaNum = matcher.group(1).toInteger()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
echo "Could not query remote version for ${pkg}; advancing from source version"
|
echo "Could not query remote version for ${pkg}; advancing from source version"
|
||||||
|
|||||||
@ -106,6 +106,7 @@ pnpm --dir packages/update test
|
|||||||
- `sdk-rn-publish #48` 在 Windows 棡出后因 8 个文件换行不一致被 Prettier 正确阻断,未发布任何包。
|
- `sdk-rn-publish #48` 在 Windows 棡出后因 8 个文件换行不一致被 Prettier 正确阻断,未发布任何包。
|
||||||
- 新增 `.gitattributes`,源码统一以 LF 检出;仅 `.bat` 保持 CRLF。
|
- 新增 `.gitattributes`,源码统一以 LF 检出;仅 `.bat` 保持 CRLF。
|
||||||
- alpha 版本号改为取源码现有序号与 Nexus 远端序号的最大值后加一,禁止版本倒退和重复发布。
|
- alpha 版本号改为取源码现有序号与 Nexus 远端序号的最大值后加一,禁止版本倒退和重复发布。
|
||||||
|
- `#49` 被 Jenkins CPS 的不可序列化正则 Matcher 阻断;算法改为只保留整数,并从 Nexus group 读标签、向 hosted 写制品。
|
||||||
|
|
||||||
### 2026-07-17 / common 第一轮
|
### 2026-07-17 / common 第一轮
|
||||||
|
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户