debug(ci): use cmd findstr to read version, add debug output

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
这个提交包含在:
XuqmGroup 2026-05-23 02:01:39 +08:00
父节点 2c8814c5e6
当前提交 e1521ea7ec

9
Jenkinsfile vendored
查看文件

@ -50,12 +50,13 @@ pipeline {
stage('Resolve Versions') {
steps {
script {
// Read version using powershell with explicit encoding
def verLine = bat(
script: '@powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::ASCII; (Get-Content gradle.properties | Select-String \'PUBLISH_VERSION\').ToString().Split(\'=\')[1].Trim()"',
// Read version using cmd.exe findstr
def verRaw = bat(
script: '@findstr /B "PUBLISH_VERSION=" gradle.properties',
returnStdout: true
).trim()
def currentVer = verLine ?: '0.1.0'
echo "DEBUG: verRaw=[${verRaw}]"
def currentVer = verRaw.contains('=') ? verRaw.split('=', 2)[1].trim() : '0.1.0'
echo "Current PUBLISH_VERSION: ${currentVer}"
def parts = currentVer.tokenize('.')