mirror of https://github.com/sbt/sbt.git
Fix kebab-case commands: notify-users-about-shell, write-sbt-version
This commit is contained in:
parent
aabb6a1e36
commit
b7c9862f16
|
|
@ -197,7 +197,9 @@ object BuiltinCommands {
|
||||||
plugin,
|
plugin,
|
||||||
plugins,
|
plugins,
|
||||||
writeSbtVersion,
|
writeSbtVersion,
|
||||||
|
oldWriteSbtVersion,
|
||||||
notifyUsersAboutShell,
|
notifyUsersAboutShell,
|
||||||
|
oldNotifyUsersAboutShell,
|
||||||
shell,
|
shell,
|
||||||
startServer,
|
startServer,
|
||||||
eval,
|
eval,
|
||||||
|
|
@ -853,12 +855,19 @@ object BuiltinCommands {
|
||||||
if (!java.lang.Boolean.getBoolean("sbt.skip.version.write") && !intendsToInvokeNew(state))
|
if (!java.lang.Boolean.getBoolean("sbt.skip.version.write") && !intendsToInvokeNew(state))
|
||||||
writeSbtVersionUnconditionally(state)
|
writeSbtVersionUnconditionally(state)
|
||||||
|
|
||||||
private def WriteSbtVersion = "write-sbt-version"
|
private def WriteSbtVersion = "writeSbtVersion"
|
||||||
|
private def OldWriteSbtVersion = "write-sbt-version"
|
||||||
|
|
||||||
private def writeSbtVersion: Command =
|
private def writeSbtVersion: Command =
|
||||||
Command.command(WriteSbtVersion) { state =>
|
Command.command(WriteSbtVersion) { state =>
|
||||||
writeSbtVersion(state); state
|
writeSbtVersion(state); state
|
||||||
}
|
}
|
||||||
|
@deprecated("Use `writeSbtVersion` instead", "1.2.0")
|
||||||
|
private def oldWriteSbtVersion: Command =
|
||||||
|
Command.command(OldWriteSbtVersion) { state =>
|
||||||
|
state.log.warn(deprecationWarningText(OldWriteSbtVersion, WriteSbtVersion))
|
||||||
|
writeSbtVersion(state); state
|
||||||
|
}
|
||||||
|
|
||||||
private def intendsToInvokeCompile(state: State) =
|
private def intendsToInvokeCompile(state: State) =
|
||||||
state.remainingCommands exists (_.commandLine == Keys.compile.key.label)
|
state.remainingCommands exists (_.commandLine == Keys.compile.key.label)
|
||||||
|
|
@ -869,10 +878,17 @@ object BuiltinCommands {
|
||||||
state.log info "Executing in batch mode. For better performance use sbt's shell"
|
state.log info "Executing in batch mode. For better performance use sbt's shell"
|
||||||
}
|
}
|
||||||
|
|
||||||
private def NotifyUsersAboutShell = "notify-users-about-shell"
|
private def NotifyUsersAboutShell = "notifyUsersAboutShell"
|
||||||
|
private def OldNotifyUsersAboutShell = "notify-users-about-shell"
|
||||||
|
|
||||||
private def notifyUsersAboutShell: Command =
|
private def notifyUsersAboutShell: Command =
|
||||||
Command.command(NotifyUsersAboutShell) { state =>
|
Command.command(NotifyUsersAboutShell) { state =>
|
||||||
notifyUsersAboutShell(state); state
|
notifyUsersAboutShell(state); state
|
||||||
}
|
}
|
||||||
|
@deprecated("Use `notifyUsersAboutShell` instead", "1.2.0")
|
||||||
|
private def oldNotifyUsersAboutShell: Command =
|
||||||
|
Command.command(OldNotifyUsersAboutShell) { state =>
|
||||||
|
state.log.warn(deprecationWarningText(OldNotifyUsersAboutShell, NotifyUsersAboutShell))
|
||||||
|
notifyUsersAboutShell(state); state
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue