mirror of
https://github.com/actions-rs/cargo.git
synced 2025-08-15 05:05:10 +00:00
Update and rename main.ts to main.js
This commit is contained in:
parent
a8590368be
commit
4c16962101
@ -5,7 +5,7 @@ import * as core from "@actions/core";
|
|||||||
import * as input from "./input";
|
import * as input from "./input";
|
||||||
import { Cargo, Cross } from "action-core";
|
import { Cargo, Cross } from "action-core";
|
||||||
|
|
||||||
export async function run(actionInput: input.Input): Promise<void> {
|
export async function run(actionInput: input.Input) {
|
||||||
let program;
|
let program;
|
||||||
if (actionInput.useCross) {
|
if (actionInput.useCross) {
|
||||||
program = await Cross.getOrInstall();
|
program = await Cross.getOrInstall();
|
||||||
@ -13,7 +13,7 @@ export async function run(actionInput: input.Input): Promise<void> {
|
|||||||
program = await Cargo.get();
|
program = await Cargo.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
let args: string[] = [];
|
let args = [];
|
||||||
if (actionInput.toolchain) {
|
if (actionInput.toolchain) {
|
||||||
args.push(`+${actionInput.toolchain}`);
|
args.push(`+${actionInput.toolchain}`);
|
||||||
}
|
}
|
||||||
@ -23,12 +23,10 @@ export async function run(actionInput: input.Input): Promise<void> {
|
|||||||
await program.call(args);
|
await program.call(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main() {
|
||||||
const matchersPath = path.join(__dirname, ".matchers");
|
const matchersPath = path.join(__dirname, ".matchers");
|
||||||
console.log(`::add-matcher::${path.join(matchersPath, "rust.json")}`);
|
console.log(`::add-matcher::${path.join(matchersPath, "rust.json")}`);
|
||||||
|
|
||||||
const actionInput = input.get();
|
const actionInput = input.get();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await run(actionInput);
|
await run(actionInput);
|
||||||
} catch (error) {
|
} catch (error) {
|
Loading…
x
Reference in New Issue
Block a user