qetza / replacetokens-task

Azure Pipelines task to replace tokens in files with variables.
MIT License
11 stars 2 forks source link

Replacetoken3 to 6 not working for me #39

Closed GSMR369 closed 3 months ago

GSMR369 commented 3 months ago

Below conversion from task@3 to task@6 is not working. 0 token out of 0. Can you pls explain the problem here.

qetza commented 3 months ago

Hi @GSMR369, You are missing the breaking change between v3 and v4 (tokenPattern input). Based on your v3 configuration here is the corresponding v6:

- task: replacetokens@6
  inputs:
    root: "$(System.DefaultWorkingDirectory)/config/"
    sources: "configuration.properties.template => configuration.properties"
    encoding: auto
    addBOM: true
    missingVarAction: none
    missingVarLog: warn
    tokenPattern: doublebraces
    telemetryOptout: false

If you want to simplify as you are using default values you can use:

- task: replacetokens@6
  inputs:
    root: "$(System.DefaultWorkingDirectory)/config/"
    sources: "configuration.properties.template => configuration.properties"
    addBOM: true
    tokenPattern: doublebraces
GSMR369 commented 3 months ago

Thanks 👍