From 05e08063d810a5178a68679c1aa1ddaf413ac64a Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 20 Nov 2023 03:58:11 +0000 Subject: [PATCH] Fix bug if no changes --- bin/update-issues | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/update-issues b/bin/update-issues index 321e68b..421ef64 100644 --- a/bin/update-issues +++ b/bin/update-issues @@ -26,11 +26,13 @@ CSV.open("tile-attribution.csv", "w") do |csv| end end -puts "Add tile-attribution.csv to git" -git.add("tile-attribution.csv") +if git.status.changed.include?("tile-attribution.csv") + puts "Add tile-attribution.csv to git" + git.add("tile-attribution.csv") -puts "Commit changes to #{branch}..." -git.commit("Update tile-attribution.csv") + puts "Commit changes to #{branch}..." + git.commit("Update tile-attribution.csv") -puts "Push branch #{branch}..." -git.push("origin", branch) + puts "Push branch #{branch}..." + git.push("origin", branch) +end