Skip to content

Commit

Permalink
Bumped version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanocerza committed Jan 4, 2021
1 parent 66c9240 commit 8a9d27b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Git {
// In case there are multiple tags get the first valid version tag
if (this.settings.tagRegex) {
res.stdout.forEach(tag => {
if (RegExp(this.settings.tagRegex).test(tag)) {
if (this.settings.tagRegex.test(tag)) {
return tag;
}
});
Expand All @@ -120,7 +120,7 @@ class Git {
}
if (this.settings.tagRegex) {
const foundTag = res.stdout[0];
if (!RegExp(this.settings.tagRegex).test(foundTag)) {
if (!this.settings.tagRegex.test(foundTag)) {
// If previous tag doesn't match the regex keep searching back
return this.previousTag(foundTag);
}
Expand Down Expand Up @@ -148,7 +148,7 @@ class Git {
const split = commit.split(' ');
const hash = split[0];
const message = split.slice(1).join(' ').trim();
if (this.settings.filterRegex && RegExp(this.settings.filterRegex).test(message)) {
if (this.settings.filterRegex && this.settings.filterRegex.test(message)) {
return;
}
commits.push(new GitCommit(hash, message));
Expand Down Expand Up @@ -299,8 +299,9 @@ function initSettings() {
return __awaiter(this, void 0, void 0, function* () {
const settings = {};
settings.gitPath = yield io.which('git', true);
settings.tagRegex = core.getInput('tag-regex') || '';
settings.filterRegex = core.getInput('filter-regex') || '';
const caseInsensitive = core.getInput('case-insensitive-regex');
settings.tagRegex = RegExp(core.getInput('tag-regex'), caseInsensitive);
settings.filterRegex = RegExp(core.getInput('filter-regex'), caseInsensitive);
settings.changelogFilePath = core.getInput('changelog-file-path') || 'CHANGELOG.md';
return settings;
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-changelog",
"version": "1.0.0",
"version": "1.1.0",
"private": true,
"description": "Action to generate a changelog from a Git repository commit history.",
"main": "lib/main.js",
Expand Down

0 comments on commit 8a9d27b

Please sign in to comment.