Commit 60fc0c55 authored by Gordon Fontenot's avatar Gordon Fontenot

Properly check to see if changes were made on push

The original implementation made poor assumptions about the name of the
pod, and used it as a regex pattern. This led to problems when trying to
push specs that contained special characters in their names (such as `+`
for category specs). Instead of using a regex, we should just do a
substring match to see if the output contains the spec name.
parent f2df9a0e
...@@ -138,7 +138,7 @@ module Pod ...@@ -138,7 +138,7 @@ module Pod
FileUtils.cp(spec_file, output_path) FileUtils.cp(spec_file, output_path)
Dir.chdir(repo_dir) do Dir.chdir(repo_dir) do
# only commit if modified # only commit if modified
if git!("status --porcelain 2>&1") =~ /#{spec.name}/ if git!("status --porcelain 2>&1").include? spec.name
UI.puts " - #{message}" UI.puts " - #{message}"
git!("add #{spec.name}") git!("add #{spec.name}")
git!("commit --no-verify -m '#{message}'") git!("commit --no-verify -m '#{message}'")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment