Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71382

contentReplace 1.8.0 generates an empty file, 1.7.0 works ok

XMLWordPrintable

      This snippet:

      contentReplace(configs: [fileContentReplaceConfig(
                     fileEncoding: 'UTF-8',
                     filePath: 'conanfile.linux.txt',
                     configs: [fileContentReplaceItemConfig(
                         search: 'cpython/\\d+\\.\\d+\\.\\d+',
                         replace: 'cpython/3.9.7')]
      )]) 

      works on on 1.7.0, but generates an empty output file in 1.8.0.

      conanfile.linux.txt file used as input is attached.

      Log on version 1.7.0:

      content-replace start
       > replace content of file: /home/jenkins-node/jenkins-root/workspace/range-Linux/range/conanfile.linux.txt
         > replace : [cpython/3.9.7] => [cpython/3.9.7]
         > replace times: 1, [cpython/\d+\.\d+\.\d+] => [cpython/3.9.7]
      content-replace end 

      Log on version 1.8.0:

      content-replace start
       > replace content of file: /home/jenkins-node/jenkins-root/workspace/range-Linux/range/conanfile.linux.txt
         > replace times: 0, [cpython/\d+\.\d+\.\d+] => [cpython/3.9.7]
      content-replace end 

       

            moxun mo xun
            zbigniewra Zbigniew
            Votes:
            6 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: