Skip to content

Commit f514e6a

Browse files
committed
added log output
1 parent f47e8f1 commit f514e6a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,14 @@ class ServerlessPlugin {
109109

110110
//If we've specified a regex expression then we'll replace that expression in the file.
111111
//Otherwise we'll just write (overwrite) the file
112-
if (params.regex) this.replaceFile(params.location, message, params.regex)
113-
else fs.writeFileSync(params.location, message);
112+
if (params.regex) {
113+
this.serverless.cli.log(`Replacing version file.`);
114+
this.replaceFile(params.location, message, params.regex)
115+
}
116+
else {
117+
this.serverless.cli.log(`Creating version file.`);
118+
fs.writeFileSync(params.location, message);
119+
}
114120
}
115121
else this.serverless.cli.log("Skipping Deployment Tracker");
116122

0 commit comments

Comments
 (0)