Skip to content

Commit

Permalink
Release 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Apr 27, 2024
1 parent 5199771 commit 990035d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions lib/appium_thor/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ def _build_gem
end

# Returns true if the tag exists on the master branch.
def tag_exists(tag_name)
cmd = %Q(git branch -a --contains "#{tag_name}")
stdout, status = Open3.capture2(cmd)
stdout.include? "* #{branch}"

def tag_exists? tag_name
cmd = %Q(git rev-parse --verify refs/tags/"#{tag_name}")
_, _, status = Open3.capture3(cmd)
status.success?
end

# Runs command. Raises an exception if the command doesn't execute successfully.
Expand Down Expand Up @@ -176,7 +175,7 @@ def _publish

# Commit then pull before pushing.
tag_name = "v#{version}"
raise 'Tag already exists!' if tag_exists tag_name
raise 'Tag already exists!' if tag_exists? tag_name

# Commit then pull before pushing.
sh "git commit --allow-empty -am 'Release #{version}'"
Expand All @@ -189,7 +188,7 @@ def _publish
notes rescue notes_failed = true
sh "git commit --allow-empty -am 'Update release notes'" unless notes_failed
sh "git push origin #{branch}"
# sh "git push origin #{tag_name}"
sh "git push origin #{tag_name}"
_build_gem
puts "Please run 'gem push #{gem_name}-#{version}.gem'"
end
Expand Down
2 changes: 1 addition & 1 deletion lib/appium_thor/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Appium
module Thor
VERSION = '2.0.3' unless defined? ::Appium::Thor::VERSION
VERSION = '2.0.4' unless defined? ::Appium::Thor::VERSION
DATE = '2024-04-26' unless defined? ::Appium::Thor::DATE
end
end

0 comments on commit 990035d

Please sign in to comment.