Bump to 0.60 (#4892)

* WIP

* semi-revert metadata change
This commit is contained in:
JT
2022-03-23 07:32:03 +13:00
committed by GitHub
parent 352cf31db2
commit 1c964cdfe7
53 changed files with 237 additions and 1425 deletions

View File

@ -1,12 +1,13 @@
use crate::inc::SemVerAction;
use crate::Inc;
use nu_plugin::{EvaluatedCall, LabeledError, Plugin};
use nu_protocol::{Signature, Value};
use nu_protocol::{ast::CellPath, Signature, SyntaxShape, Value};
impl Plugin for Inc {
fn signature(&self) -> Vec<Signature> {
vec![Signature::build("inc")
.desc("Increment a value or version. Optionally use the column of a table.")
.optional("cell_path", SyntaxShape::CellPath, "cell path to update")
.switch(
"major",
"increment the major version (eg 1.2.1 -> 2.0.0)",
@ -34,6 +35,10 @@ impl Plugin for Inc {
return Ok(Value::Nothing { span: call.head });
}
let cell_path: Option<CellPath> = call.opt(0)?;
self.cell_path = cell_path;
if call.has_flag("major") {
self.for_semver(SemVerAction::Major);
}