X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/e46ef107b205a7d38b83f38b71a3bb536274bb75..HEAD:/src/shpub/Cli.php diff --git a/src/shpub/Cli.php b/src/shpub/Cli.php index f1a6259..354af72 100644 --- a/src/shpub/Cli.php +++ b/src/shpub/Cli.php @@ -78,6 +78,7 @@ class Cli } } $this->cfg->setDebug($opts['debug']); + $this->cfg->setDryRun($opts['dryrun']); return $res; } catch (\Exception $exc) { @@ -95,7 +96,7 @@ class Cli $optParser = new \Console_CommandLine(); $optParser->name = 'shpub'; $optParser->description = 'Command line micropub client'; - $optParser->version = '0.5.2'; + $optParser->version = '0.7.1'; $optParser->subcommand_required = true; $optParser->addOption( @@ -119,6 +120,17 @@ class Cli 'default' => false, ) ); + $optParser->addOption( + 'dryrun', + array( + 'short_name' => '-n', + 'long_name' => '--dry-run', + 'description' => 'Do not send modifying HTTP request(s)' + . ' to the server', + 'action' => 'StoreTrue', + 'default' => false, + ) + ); Command_Connect::opts($optParser); Command_Server::opts($optParser);