Created
November 26, 2018 21:39
-
-
Save vcarmen/6d5cdc8fc2de4b7ada25d6795cebe995 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//task to update file content | |
task updateBuildNum { | |
def productVersion="1.2.3.0" | |
def buildNum="1.2.3.4521" | |
String contents = new File( '/tmp/dir/BuildNum.plist' ).getText( 'UTF-8' ) | |
contents = contents.replaceAll( 'version = "0.0.0.0"', 'version = '+'"'+"${productVersion}"+'"') | |
contents = contents.replaceAll( 'buildNum = "0.0.0.0"', 'buildNum = '+'"'+"${buildNum}"+'"') | |
new File( 'build/BuildNum.plist' ).write( contents, 'UTF-8' ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment