ANT ReplaceRegexp not able to make changes to files in Gitlab
I am trying to remove a few lines from a file in the src folder before deploying the changes to the target Org. I am using ReplaceRegexp to achieve this
Build.xml: below is the part of code added.
<target name="removeUserPermissions"> <replaceregexp byline="true"> <regexp pattern="<fields>"/> <substitution expression="<REMOVED>"/> <fileset dir="src/objects"> </fileset> </replaceregexp> </target>
Pipeline : The pipeline says that the changes have been made and the file updated
removeUserPermissions:
[replaceregexp] Replacing pattern '<fields>'
with '<REMOVED>'
in '/builds/myProject/src/objects/Medi.object' by line.
[replaceregexp] File has changed; saving the updated file
[replaceregexp] Replacing pattern '<fields>'
with '<REMOVED>'
in '/builds/myProject/src/objects/Medi1.object' by line.
[replaceregexp] File has changed; saving the updated file
[replaceregexp] Replacing pattern '<fields>'
with '<REMOVED>'
in '/builds/myProject/src/objects/Medi2.object' by line.
[replaceregexp] File has changed; saving the updated file
But the actual files in the Git repository have not been changed or updated.
Any reasons why this is happening?