Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
Update scope-for-gradle.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
drodriguezhdez committed Feb 25, 2020
1 parent ef74e36 commit abbc60b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13189,7 +13189,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(310));
const executor = __importStar(__webpack_require__(826));
const executor_1 = __webpack_require__(826);
const exec = __importStar(__webpack_require__(230));
function run() {
return __awaiter(this, void 0, void 0, function* () {
Expand All @@ -13198,7 +13198,7 @@ function run() {
core.exportVariable("SCOPE_DSN", dsn);
let executeTestPhase = core.getInput("run-tests", { required: true });
let command = core.getInput("command", { required: true });
yield executor.instrument(false);
yield executor_1.instrument(false);
if (executeTestPhase == "true") {
yield exec.exec("sh -c \"" + command + " --init-script initscope.gradle\"");
}
Expand Down Expand Up @@ -13377,11 +13377,11 @@ function instrument(allowBeta) {
return __awaiter(this, void 0, void 0, function* () {
const workdir = process.cwd();
const [agentVersion, pluginVersion, instrVersion] = yield Promise.all([version_parser_1.getVersionToUse(scopeAgentMetadataURL, allowBeta), version_parser_1.getVersionToUse(scopeGradlePluginMetadataURL, false), version_parser_1.getVersionToUse(scopeGradleInstrMetadataURL, false)]);
const gradleInstrumentatorPath = yield tc.downloadTool("https://repo1.maven.org/maven2/com/undefinedlabs/scope/scope-instrumentation-for-gradle/" + instrVersion + "/scope-instrumentation-for-gradle-" + instrVersion + ".jar");
const gradleInstrumentatorPath = yield tc.downloadTool(`https://repo1.maven.org/maven2/com/undefinedlabs/scope/scope-instrumentation-for-gradle/${instrVersion}/scope-instrumentation-for-gradle-${instrVersion}.jar`);
if (!gradleInstrumentatorPath.endsWith(".jar")) {
yield io.mv(gradleInstrumentatorPath, gradleInstrumentatorPath + ".jar");
}
yield exec.exec("sh -c \"java -jar " + gradleInstrumentatorPath + ".jar " + pluginVersion + " " + agentVersion + " " + workdir + " \"");
yield exec.exec(`sh -c "java -jar ${gradleInstrumentatorPath}.jar ${pluginVersion} ${agentVersion} ${workdir} "`);
});
}
exports.instrument = instrument;
Expand Down
2 changes: 1 addition & 1 deletion src/scope-for-gradle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async function run() {
let executeTestPhase = core.getInput("run-tests", {required: true});
let command = core.getInput("command", {required: true});

await executor.instrument(false);
await instrument(false);

if(executeTestPhase == "true") {
await exec.exec("sh -c \""+command+" --init-script initscope.gradle\"")
Expand Down

0 comments on commit abbc60b

Please sign in to comment.