class TYCiCore::Command::Lib::Create
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/tuya/ci/core/command/lib/create_branch.rb, line 25 def initialize(argv) super @path = argv.option('path') @tag = argv.option('tag') @branch = argv.option('branch') @temp = argv.option('temp') end
options()
click to toggle source
Calls superclass method
# File lib/tuya/ci/core/command/lib/create_branch.rb, line 9 def self.options [ ['--path=target_path', '--path target path a ci local module'], ['--tag=0.0.1', '--tag tag'], ['--branch=new_branch', '--branch new branch'], ['--temp=temp_path', '--temp a temp path'] ].concat(super) end
Public Instance Methods
run()
click to toggle source
# File lib/tuya/ci/core/command/lib/create_branch.rb, line 33 def run require 'tuya/ci/core' TYGit.checkout_custom_branch(@path, @tag, @branch, @temp) end
validate!()
click to toggle source
# File lib/tuya/ci/core/command/lib/create_branch.rb, line 18 def validate! help! "path need" unless @path help! "tag need" unless @tag help! "branch need" unless @branch help! "temp need" unless @temp end