knom / vsts-regex-tasks

VSTS Regex Build/Release Tasks
MIT License
6 stars 8 forks source link

Found 0 files to perform regEx replace #12

Closed caribbean-irie closed 6 years ago

caribbean-irie commented 6 years ago

Hi There,

I am currently using this VSTS task to perform substitution for an angular 6 app, and having trouble getting it working. I'm trying to perform substitution on the main..js file generated by the build. (where is a random stamp with letter and number) In the main.*.js i am trying to replace some properties e.g someUrl:"http://localhost:4200"

here is what i've tried so far in the VSTS task Search Pattern is **\*main.*.js Find Regex: someUrl:"(http[a-zA-Z0-9.:/\-]+)" Replace with someUrl:"$(someUrl)" where $(someUrl) is a variable defined in VSTS

When i look at the deployment logs i can see the following

Search Pattern is **\*main.*.js
Found 0 files
Replacing someUrl:"(http[a-zA-Z0-9.:/\-]+)" with someUrl:"https://mynewUrl.com"

No substitution has happened could tell me what i am doing wrong please?

knom commented 6 years ago

As far as I can tell by this line... Search Pattern is **\*main.*.js there seems to be an extra dot in the search pattern!

Try **\*main.js instead.