Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
Add base64 transform (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
qetza authored Aug 22, 2021
1 parent 4b8041e commit 1085bc9
Show file tree
Hide file tree
Showing 9 changed files with 301 additions and 263 deletions.
3 changes: 3 additions & 0 deletions ReplaceTokens/ReplaceTokensV3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ If you want to use tokens in XML based configuration files to be replaced during
- replace tokens in your updated configuration file

## Release notes
**New in 3.8.0**
- Add `base64` transform ([#163](https://github.com/qetza/vsts-replacetokens-task/issues/163)).

**New in 3.7.1**
- Fix issue on binary files ([#193](https://github.com/qetza/vsts-replacetokens-task/issues/193)).
- Rollback output variables ([#196](https://github.com/qetza/vsts-replacetokens-task/issues/196)).
Expand Down
4 changes: 4 additions & 0 deletions ReplaceTokens/ReplaceTokensV3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ var replaceTokensInFile = function (
case 'noescape':
// nothing done here, disable escaping later
break;

case 'base64':
value = Buffer.from(value).toString('base64');
break;

default:
--localCounter.Transforms;
Expand Down
4 changes: 2 additions & 2 deletions ReplaceTokens/ReplaceTokensV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"author": "Guillaume Rouchon",
"version": {
"Major": 3,
"Minor": 7,
"Patch": 1
"Minor": 8,
"Patch": 0
},
"instanceNameFormat": "Replace tokens in $(targetFiles)",
"minimumAgentVersion": "2.105.0",
Expand Down
3 changes: 2 additions & 1 deletion ReplaceTokens/ReplaceTokensV4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ If you want to use tokens in XML based configuration files to be replaced during
## Release notes
**New in 4.0.0**
- **Breaking change**: Add output variables ([#160](https://github.com/qetza/vsts-replacetokens-task/issues/160)). (some older version of TFS/Azure Pipelines doesn't support output variables when used in release pipelines)
- **Breaking change**: Add dropdown parameter _Token pattern_ to select token pattern ([#131](https://github.com/qetza/vsts-replacetokens-task/issues/131)). (users with customized token pattern will need to manually select one or `custom`)
- **Breaking change**: Add dropdown parameter _Token pattern_ to select token pattern ([#131](https://github.com/qetza/vsts-replacetokens-task/issues/131)). (users with customized token pattern will need to manually select one or `custom`)
- Add `base64` transform ([#163](https://github.com/qetza/vsts-replacetokens-task/issues/163)).
4 changes: 4 additions & 0 deletions ReplaceTokens/ReplaceTokensV4/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ var replaceTokensInFile = function (
// nothing done here, disable escaping later
break;

case 'base64':
value = Buffer.from(value).toString('base64');
break;

default:
--localCounter.Transforms;
logger.warn(' unknown transform: ' + transformName);
Expand Down
1 change: 0 additions & 1 deletion ReplaceTokens/ReplaceTokensV4/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"Minor": 0,
"Patch": 0
},
"preview": true,
"releaseNotes": "Added output variables (breaking change).<br/>Added token pattern dropdown (breaking change).",
"instanceNameFormat": "Replace tokens in $(targetFiles)",
"minimumAgentVersion": "2.105.0",
Expand Down
Loading

0 comments on commit 1085bc9

Please sign in to comment.