Skip to content

Commit

Permalink
Run the build command
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdales committed Apr 13, 2023
1 parent 2637d23 commit c1b0ca7
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,7 @@ exports.toChangedFilesMatchConfig = toChangedFilesMatchConfig;
function printPattern(matcher) {
return (matcher.negate ? '!' : '') + matcher.pattern;
}
function isAnyMatch(changedFile, matchers) {
core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`);
if (matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} matched`);
return true;
}
}
core.debug(` no patterns matched`);
return false;
}
function isAllMatch(changedFile, matchers) {
function isMatch(changedFile, matchers) {
core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`);
Expand All @@ -213,7 +201,7 @@ function isAllMatch(changedFile, matchers) {
function checkAnyChangedFiles(changedFiles, globs) {
const matchers = globs.map(g => new minimatch_1.Minimatch(g));
for (const changedFile of changedFiles) {
if (isAnyMatch(changedFile, matchers)) {
if (isMatch(changedFile, matchers)) {
core.debug(` "any" patterns matched against ${changedFile}`);
return true;
}
Expand All @@ -225,7 +213,7 @@ exports.checkAnyChangedFiles = checkAnyChangedFiles;
function checkAllChangedFiles(changedFiles, globs) {
const matchers = globs.map(g => new minimatch_1.Minimatch(g));
for (const changedFile of changedFiles) {
if (!isAllMatch(changedFile, matchers)) {
if (!isMatch(changedFile, matchers)) {
core.debug(` "all" patterns did not match against ${changedFile}`);
return false;
}
Expand Down

0 comments on commit c1b0ca7

Please sign in to comment.