Class PushCommand

Pushes the specified script(s) to the selected Content Hub instance.

Inheritance
object
Sitecore.CH.Cli.Core.Abstractions.Commands.BaseCommand<THandler>Sitecore.CH.Cli.Plugin.Scripting.CommandHandlers.PushCommandHandler
PushCommand
Namespace: SitecoreSitecore.CHSitecore.CH.CliSitecore.CH.Cli.PluginSitecore.CH.Cli.Plugin.ScriptingCommands
Assembly: Sitecore.CH.Cli.Plugin.Scripting.dll
Syntax
RequestResponse
public class PushCommand : BaseCommand<PushCommandHandler>
Remarks

Required parameters

  • --name -n Specified the name of the script to Push from the Content Hub instance.

Optional parameters

  • --endpoint -e Specifies an alternative endpoint name for the execution of this command.
  • --publish -p Whether the script(s) should be publish after successfully compiling.
  • --enable -b Whether the script(s) should be set to enable.
  • --folder -f Specifies the script working folder where the script files are located. If the --folder option is not specified, the current folder is assumed to be the script working folder.

Global parameters

  • -? --help -h Show this help message and exit.
  • -v --verbosity Enables verbose logging.
Examples

Push all scripts from the working directory:

RequestResponse
ch-cli scripting push -n "<*>"

Push all scripts from the specified working directory:

RequestResponse
ch-cli scripting push -n "<*>" -folder "<working folder>"

Push, enable all scripts from the specified working directory:

RequestResponse
ch-cli scripting push -n "<*>" -folder "<working folder>" --enable

Push a script from the working directory:

RequestResponse
ch-cli scripting push -n "<my-script>"

Push, publish and enable a script from the working directory:

RequestResponse
ch-cli scripting push -n "<my-script>" --enable --publish

Push, publish and enable a script from the specified working directory:

RequestResponse
ch-cli scripting push -n "<my-script>" --enable --publish --folder "<working folder>"

Do you have some feedback for us?

If you have suggestions for improving this article,