chore(cli): refactor
This commit is contained in:
parent
4faa61159e
commit
c4e55490cc
@ -1,11 +1,6 @@
|
|||||||
#! /usr/bin/env bun
|
#! /usr/bin/env bun
|
||||||
import { parseArgs } from 'node:util'
|
|
||||||
import semver from 'semver'
|
|
||||||
import { z } from 'zod'
|
|
||||||
import { upload_commits } from './upload_commits'
|
import { upload_commits } from './upload_commits'
|
||||||
//import { pushCommits } from './pushCommits'
|
|
||||||
import { args } from './utils/arguments'
|
import { args } from './utils/arguments'
|
||||||
import { git_log } from './utils/git_log'
|
|
||||||
|
|
||||||
if (args.success) {
|
if (args.success) {
|
||||||
upload_commits(args.data)
|
upload_commits(args.data)
|
||||||
|
@ -34,7 +34,7 @@ export const args = schema.safeParse(mappedArguments)
|
|||||||
|
|
||||||
if (!args.success) {
|
if (!args.success) {
|
||||||
console.error(
|
console.error(
|
||||||
`@changelog/cli: Missing arguemnts: ${args.error.errors
|
`boring.tools CLI: Missing arguemnts: ${args.error.errors
|
||||||
.map((error) => error.path[0])
|
.map((error) => error.path[0])
|
||||||
.join(', ')}`,
|
.join(', ')}`,
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const GITFORMAT =
|
const GITFORMAT =
|
||||||
'--pretty=format:{"commit": "%h", "parent": "%p", "refs": "%D", "subject": "%s", "author": { "name": "%aN", "email": "%aE", "date": "%ad" }, "commiter": { "name": "%cN", "email": "%cE", "date": "%cd" }},'
|
'--pretty=format:{"commit": "%h", "parent": "%p", "refs": "%D", "subject": "%s", "author": { "name": "%aN", "email": "%aE", "date": "%ad" }, "commiter": { "name": "%cN", "email": "%cE", "date": "%cd" }},'
|
||||||
|
|
||||||
export const git_log = async (
|
export const git_log = async (
|
||||||
from: string | undefined,
|
from: string | undefined,
|
||||||
to = 'HEAD',
|
to = 'HEAD',
|
||||||
|
Loading…
Reference in New Issue
Block a user