-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52932ca
commit 4075973
Showing
10 changed files
with
483 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const core_1 = require("@actions/core"); | ||
const github_1 = require("@actions/github"); | ||
const core_2 = require("./core"); | ||
if (require.main === module) { | ||
console.log("Tangle Release Starting"); | ||
const releaseTag = core_1.getInput("tag_name", { required: true }); | ||
const comment = core_1.getInput("comment", { required: false }); | ||
const { owner, repo } = github_1.context.repo; | ||
const envConfig = { | ||
githubToken: process.env.GITHUB_TOKEN, | ||
owner, | ||
repository: repo, | ||
releaseTag, | ||
node: process.env.IOTA_NODE, | ||
depth: process.env.IOTA_DEPTH, | ||
mwm: process.env.IOTA_MWM, | ||
seed: process.env.IOTA_SEED, | ||
addressIndex: process.env.IOTA_ADDRESS_INDEX, | ||
transactionTag: process.env.IOTA_TAG, | ||
comment, | ||
explorerUrl: process.env.IOTA_TANGLE_EXPLORER | ||
}; | ||
const config = core_2.sanitizeInput(envConfig); | ||
core_2.tangleRelease(config, message => console.log(message)) | ||
.then(transactionDetails => { | ||
core_1.setOutput("tx_hash", transactionDetails.hash); | ||
core_1.setOutput("tx_explore_url", transactionDetails.url); | ||
console.log("Transaction Hash:", transactionDetails.hash); | ||
console.log("You can view the transaction on the tangle at:", transactionDetails.url); | ||
console.log("Complete"); | ||
}) | ||
.catch(err => { | ||
core_1.setFailed(err.message); | ||
console.log(err); | ||
}); | ||
} | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const core_1 = require("@actions/core"); | ||
const github_1 = require("@actions/github"); | ||
const core_2 = require("./core"); | ||
if (require.main === module) { | ||
console.log("Tangle Release Starting"); | ||
const releaseTag = core_1.getInput("tag_name", { required: true }); | ||
const comment = core_1.getInput("comment", { required: false }); | ||
const { owner, repo } = github_1.context.repo; | ||
const envConfig = { | ||
githubToken: process.env.GITHUB_TOKEN, | ||
owner, | ||
repository: repo, | ||
releaseTag, | ||
node: process.env.IOTA_NODE, | ||
depth: process.env.IOTA_DEPTH, | ||
mwm: process.env.IOTA_MWM, | ||
seed: process.env.IOTA_SEED, | ||
addressIndex: process.env.IOTA_ADDRESS_INDEX, | ||
transactionTag: process.env.IOTA_TAG, | ||
comment, | ||
explorerUrl: process.env.IOTA_TANGLE_EXPLORER | ||
}; | ||
const config = core_2.sanitizeInput(envConfig); | ||
core_2.tangleRelease(config, message => console.log(message)) | ||
.then(transactionDetails => { | ||
core_1.setOutput("tx_hash", transactionDetails.hash); | ||
core_1.setOutput("tx_explore_url", transactionDetails.url); | ||
console.log("Transaction Hash:", transactionDetails.hash); | ||
console.log("You can view the transaction on the tangle at:", transactionDetails.url); | ||
console.log("Complete"); | ||
}) | ||
.catch(err => { | ||
core_1.setFailed(err.message); | ||
console.log(err); | ||
}); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/usr/bin/env node | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cli_core_1 = require("./cli-core"); | ||
cli_core_1.cliCore(process.argv, process.env, (message, param) => { | ||
process.stdout.write(message); | ||
if (param) { | ||
process.stdout.write(` ${param}`); | ||
} | ||
process.stdout.write("\n"); | ||
}).catch(err => process.stderr.write(err.message)); | ||
#!/usr/bin/env node | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cli_core_1 = require("./cli-core"); | ||
cli_core_1.cliCore(process.argv, process.env, (message, param) => { | ||
process.stdout.write(message); | ||
if (param) { | ||
process.stdout.write(` ${param}`); | ||
} | ||
process.stdout.write("\n"); | ||
}).catch(err => process.stderr.write(err.message)); |
Oops, something went wrong.