UNPKG

@vortex.so/cli

Version:

CLI to interact with Vortex.

31 lines (28 loc) 779 B
import process from 'node:process'; import { gitAdd, gitCommit } from './ship.git.mjs'; import { getInput } from './ship.input.mjs'; import { Operation } from './ship.operation.mjs'; import { Log } from '../../utils/log/index.mjs'; const log = new Log("Ship"); async function commit() { const operation = await Operation.start({ release: { type: "prompt", preid: "beta" }, push: false, files: ["vortex.yaml"], cwd: process.cwd(), ignoreScripts: false, interface: { input: process.stdin, output: process.stdout } }); try { await getInput(operation); await gitAdd(); await gitCommit(operation); log.ok("All done!"); } catch (error) { log.fail(error?.message || "Something is failed."); } } export { commit };