Sha256: 4139ab23a9ff292490f8a8bb81b136f31ad3983fdcf6b44fc42c7d76858ca3cd
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
require 'cocoapods' module Pod class TagUtil # tag 是否存在 def self.exist_tag(tag) tag_string = `git tag -l` tag_list = tag_string.to_s.split("\n") tag_list.include?(tag) end def self.git_delete_tag(tag) `git tag -d #{tag}` `git push origin :refs/tags/#{tag}` end # tag 是否存在符合格式的分支 def self.check_master_branch branch_name = `git symbolic-ref --short -q HEAD` UI.puts("current branch: #{branch_name}") if branch_name.to_s.strip == "master" return true end false end # 上传Sources def self.upload_origin_sources(commit_desc) `git status -s` `git add .` `git commit -m '#{commit_desc}'` `git push origin master` end def self.check_branch_include_tag(tag) branch_name = `git symbolic-ref --short -q HEAD` if branch_name.to_s.strip == "master" return true end if branch_name.include?(tag.to_s) return true end false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cocoapods-hd-0.1.0 | lib/cocoapods-hd/tag_util.rb |