Class: Build::RepoXCode

Inherits:
Repo
  • Object
show all
Defined in:
lib/core_blur/repo_xcode.rb

Direct Known Subclasses

RepoXCodeShell, RepoXcodePackage

Instance Attribute Summary collapse

Attributes inherited from Repo

#branch, #gitlab_helper, #http_url, #last_commit, #page_url, #path, #pusher, #repo_path, #size, #size_format, #ssh_url, #user_email, #user_name

Instance Method Summary collapse

Methods inherited from Repo

#clear, #discard_pull, #git_add_stag, #git_checkout, #git_clone, #git_commit, #git_fetch, #git_pull, #git_push, #git_push_f, #git_push_tags, #git_reset_hard, #git_status, #git_tag_delete_local, #git_tag_delete_origin, #git_tag_local, #git_tag_origin, #push_code

Constructor Details

#initialize(path, ssh_url, branch, xcworkspace = nil, scheme = nil) ⇒ RepoXCode

Returns a new instance of RepoXCode.



7
8
9
10
11
# File 'lib/core_blur/repo_xcode.rb', line 7

def initialize(path, ssh_url, branch, xcworkspace = nil, scheme = nil)
  super(path, ssh_url, branch)
  @xcworkspace = xcworkspace
  @scheme = scheme
end

Instance Attribute Details

#schemeObject (readonly)

Returns the value of attribute scheme.



6
7
8
# File 'lib/core_blur/repo_xcode.rb', line 6

def scheme
  @scheme
end

#xcworkspaceObject (readonly)

Returns the value of attribute xcworkspace.



5
6
7
# File 'lib/core_blur/repo_xcode.rb', line 5

def xcworkspace
  @xcworkspace
end

Instance Method Details

#pod_updateObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/core_blur/repo_xcode.rb', line 12

def pod_update
  current = FileUtils.pwd
  Dir.chdir(self.path)
  dir_name = File.basename(self.path)
  command = "pod update"
  puts "\n⏩ (#{dir_name})执行命令: #{command}"
  res = system command
  unless res == true
    error = "git命令执行失败: #{command}"
    pusher.push("❌ 打包失败", error)
    Process.exit(-1)
  end
  Dir.chdir(current)
end