@dappnode/dappnodesdk
Version:
dappnodesdk is a tool to make the creation of new dappnode packages as simple as possible. It helps to initialize and publish in ethereum blockchain
30 lines • 1.1 kB
JavaScript
import { increaseFromLocalVersion } from "../utils/versions/increaseFromLocalVersion.js";
import { defaultComposeFileName, defaultDir } from "../params.js";
export const command = "increase [type]";
export const describe = "Increases the version defined in the manifest";
export const increase = {
command: "increase [type]",
describe: "Increases the version defined in the manifest",
builder: yargs => yargs.positional("type", {
description: "Semver update type: [ major | minor | patch ]",
choices: ["major", "minor", "patch"],
type: "string",
demandOption: true
}),
handler: async (args) => {
const nextVersion = await increaseHandler(args);
// Output result: "0.1.8"
console.log(nextVersion);
}
};
/**
* Common handler for CLI and programatic usage
*/
export async function increaseHandler({ type, dir = defaultDir, compose_file_name = defaultComposeFileName }) {
return await increaseFromLocalVersion({
type: type,
dir,
compose_file_name
});
}
//# sourceMappingURL=increase.js.map