bin/braid in braid-1.0.22 vs bin/braid in braid-1.1.0
- old
+ new
@@ -62,11 +62,11 @@
mixin :argument_url, :optional_local_path, :option_branch, :option_tag, :option_revision, :option_verbose, :option_path
run {
check_no_extra_args!
Braid.verbose = verbose
- Braid::Command.run(:add, url, {'path' => local_path, 'branch' => branch, 'tag' => tag, 'revision' => revision, 'remote_path' => path})
+ Braid::Command.run(:Add, url, {'path' => local_path, 'branch' => branch, 'tag' => tag, 'revision' => revision, 'remote_path' => path})
}
}
mode(:update) {
description <<-TXT
@@ -95,11 +95,11 @@
'revision' => revision,
'head' => head,
'keep' => keep
}
Braid.verbose = verbose
- Braid::Command.run(:update, local_path, options)
+ Braid::Command.run(:Update, local_path, options)
}
}
mode(:remove) {
description <<-TXT
@@ -120,11 +120,11 @@
check_no_extra_args!
options = {
:keep => keep
}
Braid.verbose = verbose
- Braid::Command.run(:remove, local_path, options)
+ Braid::Command.run(:Remove, local_path, options)
}
}
mode(:diff) {
description <<-TXT
@@ -147,11 +147,11 @@
options = {
'keep' => keep,
'git_diff_args' => @argv
}
Braid.verbose = verbose
- Braid::Command.run(:diff, local_path, options)
+ Braid::Command.run(:Diff, local_path, options)
}
}
mode(:push) {
description <<-TXT
@@ -165,11 +165,11 @@
options = {
'keep' => keep,
'branch' => branch
}
Braid.verbose = verbose
- Braid::Command.run(:push, local_path, options)
+ Braid::Command.run(:Push, local_path, options)
}
}
mode(:setup) {
description <<-TXT
@@ -180,11 +180,11 @@
run {
check_no_extra_args!
Braid.verbose = verbose
Braid.force = force
- Braid::Command.run(:setup, local_path)
+ Braid::Command.run(:Setup, local_path)
}
}
mode(:version) {
description 'Show braid version.'
@@ -201,10 +201,47 @@
mixin :optional_local_path, :option_verbose
run {
check_no_extra_args!
Braid.verbose = verbose
- Braid::Command.run(:status, local_path)
+ Braid::Command.run(:Status, local_path)
+ }
+ }
+
+ mode('upgrade-config') {
+ description <<-DESC
+ Upgrade your project's Braid configuration to the latest configuration version.
+ Other commands will notify you when you need to do this. This may make older
+ versions of Braid unable to read the configuration and may introduce breaking
+ changes in how the configuration is handled by Braid. An upgrade that
+ introduces breaking changes will not be performed without the
+ --allow-breaking-changes option.
+ DESC
+
+ mixin :option_verbose
+
+ option('dry-run') {
+ optional
+ desc 'Explain the consequences of the upgrade without performing it.'
+ attr :dry_run
+ }
+
+ option('allow-breaking-changes') {
+ optional
+ desc <<-DESC
+ Perform the upgrade even if it involves breaking changes.
+ DESC
+ attr :allow_breaking_changes
+ }
+
+ run {
+ check_no_extra_args!
+ options = {
+ 'dry_run' => dry_run,
+ 'allow_breaking_changes' => allow_breaking_changes
+ }
+ Braid.verbose = verbose
+ Braid::Command.run(:UpgradeConfig, options)
}
}
mixin(:argument_local_path) {
argument(:local_path) {