I believe that computers are the best things for doing repetitive tasks. I certainly am not, I either forget, or (mostly) don\'t do things in a consistent way - which isn\'
' for windows
' preBuildMy.cmd include repVer.vbs
' repVer.vbs :
Dim objFileSystem, objOutputFile
Dim objInputFile
Dim sText,gitFile
FileName = "./bin/AndroidManifest.xml"
' gitFile = ".\..\.git\refs\heads\master"
gitFile = ".\..\.git\refs\remotes\origin\master"
Set objFileSystem = CreateObject("Scripting.fileSystemObject")
set objInputFile= objFileSystem.OpenTextFile(FileName)
sText= objInputFile.ReadAll
set objOutputFile = objFileSystem.CreateTextFile(FileName , TRUE)
set objInputFile= objFileSystem.OpenTextFile(gitFile)
refText= objInputFile.ReadAll
sText = Replace(sText,"v1.0","v 1.0 " & Now & " ref=" & mid(refText,1,7))
objOutputFile.WriteLine(sText)
objOutputFile.Close
Set objFileSystem = Nothing
WScript.Quit(0)