Merge pull request #25 from richardrigutins/more-logs
Add more log messages
This commit is contained in:
commit
a51766e385
|
|
@ -47,6 +47,16 @@ jobs:
|
|||
replacement-text: 'world'
|
||||
exclude: '**/*.check.txt'
|
||||
|
||||
- name: Replace in Files - replace using environment variable
|
||||
uses: ./
|
||||
with:
|
||||
search-text: '_ENV_'
|
||||
files: '**/*.txt'
|
||||
replacement-text: ${{ env.REPLACEMENT }}
|
||||
exclude: '**/*.check.txt'
|
||||
env:
|
||||
REPLACEMENT: environment
|
||||
|
||||
- name: Replace in Files - pattern finds only one file
|
||||
uses: ./
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ function run() {
|
|||
return;
|
||||
}
|
||||
(0, core_1.info)(`Found ${filePaths.length} files for the given pattern.`);
|
||||
(0, core_1.info)(`Replacing text...`);
|
||||
(0, core_1.info)(`Replacing "${searchText}" with "${replaceText}".`);
|
||||
const encoding = inputEncoding;
|
||||
const promises = filePaths.map((filePath) => __awaiter(this, void 0, void 0, function* () {
|
||||
(0, core_1.debug)(`Replacing text in file ${filePath}`);
|
||||
(0, core_1.info)(`Replacing text in file ${filePath}`);
|
||||
yield (0, utils_1.replaceTextInFile)(filePath, searchText, replaceText, encoding);
|
||||
}));
|
||||
yield Promise.all(promises);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -25,12 +25,12 @@ async function run(): Promise<void> {
|
|||
}
|
||||
|
||||
info(`Found ${filePaths.length} files for the given pattern.`);
|
||||
info(`Replacing text...`);
|
||||
info(`Replacing "${searchText}" with "${replaceText}".`);
|
||||
|
||||
const encoding = inputEncoding as Encoding;
|
||||
const promises: Promise<void>[] = filePaths.map(
|
||||
async (filePath: string) => {
|
||||
debug(`Replacing text in file ${filePath}`);
|
||||
info(`Replacing text in file ${filePath}`);
|
||||
await replaceTextInFile(filePath, searchText, replaceText, encoding);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ Version: 1.0.2.
|
|||
Hello world!
|
||||
This should be twenty-three: 23.
|
||||
This line has been changed: false.
|
||||
This value comes from environment variables: environment
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@ Version: @VERSION@.
|
|||
Hello {0}!
|
||||
This should be twenty-three: 23.
|
||||
This line has been changed: false.
|
||||
This value comes from environment variables: _ENV_
|
||||
|
|
|
|||
Loading…
Reference in New Issue