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

Commit

Permalink
Fix matching directory (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
qetza committed Nov 17, 2019
1 parent 6dcf1dc commit 6b91d96
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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.2.2**
- Fix matching issue with directory

**New in 3.2.1**
- Fix log issue with escaped secret values

Expand Down
2 changes: 1 addition & 1 deletion make.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ target.package = function() {
if (options.version === 'auto') {
var ref = new Date(2000, 1, 1);
var now = new Date();
var major = 2
var major = 3
var minor = Math.floor((now - ref) / 86400000);
var patch = Math.floor(Math.floor(now.getSeconds() + (60 * (now.getMinutes() + (60 * now.getHours())))) * 0.5)
options.version = major + '.' + minor + '.' + patch
Expand Down
5 changes: 5 additions & 0 deletions task/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ async function run() {

// process files
tl.findMatch(root, targetFiles).forEach(filePath => {
if (tl.stats(filePath).isDirectory())
{
return;
}

if (!tl.exist(filePath))
{
logger.error('file not found: ' + filePath);
Expand Down
2 changes: 1 addition & 1 deletion task/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 3,
"Minor": 2,
"Patch": 1
"Patch": 2
},
"instanceNameFormat": "Replace tokens in $(targetFiles)",
"minimumAgentVersion": "2.105.0",
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "replacetokens",
"name": "Replace Tokens",
"version": "3.2.1",
"version": "3.2.2",
"public": true,
"publisher": "qetza",
"targets": [
Expand Down

0 comments on commit 6b91d96

Please sign in to comment.