mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-30 21:35:10 +00:00
fix regexp
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
@@ -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()
|
||||
|
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user