diff --git a/cli/commands/bump.ts b/cli/commands/bump.ts index 43050e9..d80515a 100644 --- a/cli/commands/bump.ts +++ b/cli/commands/bump.ts @@ -1,6 +1,6 @@ import { Colors } from "../deps.ts"; -import { getMeta, setMeta } from "../global.ts"; +import { getMeta, setMeta, log } from "../global.ts"; export default async function bump( options: any, @@ -26,6 +26,7 @@ export default async function bump( default: throw new Error("type must be either major, minor or patch"); } + log(major, minor, patch); const newVersion = [major, minor, patch].join("."); console.log( "Bumping version from", diff --git a/cli/commands/deprecate.ts b/cli/commands/deprecate.ts new file mode 100644 index 0000000..2e3be83 --- /dev/null +++ b/cli/commands/deprecate.ts @@ -0,0 +1,20 @@ +import { Colors, Cliffy } from "../deps.ts"; + +import { getMeta, setMeta, log } from "../global.ts"; + +export default async function deprecate(options: any) { + const meta = await getMeta(); + + const res = await Cliffy.Confirm.prompt( + "Are you shure you want to deprecat this package?" + ); + + if (res) { + meta.deprecated = true; + console.log(Colors.yellow("Package marked as deprecated!")); + } else { + console.log("Deprecation canceled"); + } + + await setMeta(meta); +}