2
0
mirror of https://github.com/meganz/MEGAcmd synced 2025-08-30 21:35:10 +00:00

fix regexp

This commit is contained in:
Pablo Martin
2024-08-27 13:35:39 +02:00
parent 819edce0ec
commit a7a8418fdb
3 changed files with 3 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ def buildAndSignPackage(String distro, String architecture, String packageName)
def getVersionFromHeader(String versionFilePath) {
return sh(script: """
grep -Po "(set.MEGACMD_MAJOR_VERSION \K\d+|set.MEGACMD_MINOR_VERSION \K\d+|set.MEGACMD_MICRO_VERSION \K\d+|)" $versionFilePath | paste -sd '.'
grep -Po "(set\\(MEGACMD_MAJOR_VERSION \\K\\d+|set.MEGACMD_MINOR_VERSION \\K\\d+|set\\(MEGACMD_MICRO_VERSION \\K\\d+)" $versionFilePath | paste -sd '.'
"""
, returnStdout: true).trim()
}

View File

@@ -87,7 +87,7 @@ pipeline {
script{
MEGACMD_VERSION = sh (
script: '''
grep -Po "(set.MEGACMD_MAJOR_VERSION \K\d+|set.MEGACMD_MINOR_VERSION \K\d+|set.MEGACMD_MICRO_VERSION \K\d+|)" CMakeLists.txt | paste -sd '.'
grep -Po "set\\(MEGACMD_MAJOR_VERSION \\K\\d+|set.MEGACMD_MINOR_VERSION \\K\\d+|set\\(MEGACMD_MICRO_VERSION \\K\\d+)" CMakeLists.txt | paste -sd '.'
''',
returnStdout: true
).trim()

View File

@@ -141,7 +141,7 @@ pipeline {
def getVersionFromHeader(String versionFilePath) {
return sh(script: """
grep -Po "(set.MEGACMD_MAJOR_VERSION \K\d+|set.MEGACMD_MINOR_VERSION \K\d+|se.MEGACMD_MICRO_VERSION \K\d+|)" $versionFilePath | paste -sd '.'
grep -Po "(set\\(MEGACMD_MAJOR_VERSION \\K\\d+|set.MEGACMD_MINOR_VERSION \\K\\d+|set\\(MEGACMD_MICRO_VERSION \\K\\d+)" $versionFilePath | paste -sd '.'
"""
, returnStdout: true).trim()
}