修正ci替换版本号的小问题

This commit is contained in:
MrZ626
2021-11-01 17:24:47 +08:00
parent 457681e6ec
commit f9e37f3c6a

View File

@@ -29,7 +29,7 @@ runs:
commitHash = '${{ inputs.commit }}'
commitHash = commitHash[0:4] if commitHash != '' else '????'
data = file.read()
data = re.sub('(\d)"', r'\1@' + commitHash + '"', data)
data = re.sub('(\d)"', r'\1@' + commitHash + '"', data, 1)
file.seek(0)
file.truncate()
file.flush()