Skip to content

Commit

Permalink
Adds warning message for people using v1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkar598 committed Oct 13, 2022
1 parent 3402960 commit 03a5626
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 48 deletions.
12 changes: 9 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
Expand All @@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Expand All @@ -25,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var fs_1 = __importDefault(require("fs"));
var os_1 = __importDefault(require("os"));
var core = __importStar(require("@actions/core"));
process.stdout.write("::warning file=README.md::This version of DreamAnnotate is deprecated, see https://github.com/yogstation13/DreamAnnotate/discussions/1 for more details." + os_1.default.EOL);
try {
var data = fs_1.default.readFileSync(core.getInput("outputFile")).toString("utf8");
core.info("DreamChecker Output: ");
Expand All @@ -33,9 +38,10 @@ try {
var matches = Array.from(data.matchAll(regex), function (m) { return m.groups; });
for (var _i = 0, matches_1 = matches; _i < matches_1.length; _i++) {
var match = matches_1[_i];
process.stdout.write("::" + match.type + " file=" + match.filename + ",line=" + match.line + ",col=" + match.column + "::" + match.message + os_1.default.EOL);
process.stdout.write("::".concat(match.type, " file=").concat(match.filename, ",line=").concat(match.line, ",col=").concat(match.column, "::").concat(match.message).concat(os_1.default.EOL));
}
}
catch (error) {
//@ts-ignore
core.setFailed(error.message);
}
18 changes: 18 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 17 additions & 44 deletions node_modules/@actions/core/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 22 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export interface Match {
message: string
}

process.stdout.write("::warning file=README.md::This version of DreamAnnotate is deprecated, see https://github.com/yogstation13/DreamAnnotate/discussions/1 for more details." + os.EOL)

try {
const data = fs.readFileSync(core.getInput("outputFile")).toString("utf8");
core.info("DreamChecker Output: ");
Expand All @@ -21,5 +23,6 @@ try {
process.stdout.write(`::${match.type} file=${match.filename},line=${match.line},col=${match.column}::${match.message}${os.EOL}`)
}
} catch (error) {
//@ts-ignore
core.setFailed(error.message)
}

0 comments on commit 03a5626

Please sign in to comment.