【发布时间】:2016-07-19 15:34:18
【问题描述】:
我在 jenkins 中有一个 windows 批处理命令:
set /p Build=<version.txt
IF ("%Build%"=="%VERSION%") (echo version doesn't match)
IF NOT ("%Build%"=="%VERSION%") (echo version match)
Build 和 VERSION 是从构建中获得的。上面的输出是
w:\ce-billing-release>set /p Build= 0<version.txt
w:\ce-billing-release>IF ("1.1.0" == "1.1.0") (echo version match )
w:\ce-billing-release>IF NOT ("1.1.0" == "1.1.0") (echo version doesn't match )
version doesn't match
尽管它得到了两个变量 = 1.1.0 的正确值,但由于某种原因它认为它们不相等。我错过了什么?
【问题讨论】:
标签: windows batch-file jenkins command-prompt