From 32f0cec102f387f64750c7c3bcd1f845b073638f Mon Sep 17 00:00:00 2001 From: James Kessler Date: Mon, 12 Aug 2024 17:16:21 -0700 Subject: [PATCH 1/2] Modify makefile to fix issues with sed handling inputs. --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index abc48f4..2172561 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,11 @@ release: release_linux .ONESHELL: new_version: - @read -p "New version: " version - @read -p "Brief description: " description - sed -i "s/version:.*/version: $$version/" shard.yml - sed -i "s/VERSION = ".*"/VERSION = \"$$version\"/" src/coverage_reporter.cr - git add shard.yml src/coverage_reporter.cr - git commit --message "$$version: $$description" - git tag --annotate --message "$$version: $$description" v$$version + @read -p "New version: " version; \ + @read -p "Brief description: " description; \ + sed -i '' "s/version:.*/version: $${version}/" shard.yml; \ + sed -i '' "s/VERSION = .*/VERSION = \"$${version}\"/" src/coverage_reporter.cr; \ + git add shard.yml src/coverage_reporter.cr; \ + git commit --message "$${version}: $${description}"; \ + git tag --annotate v$${version} --message "$${version}: $${description}"; \ + git push origin master --follow-tags From fa8ec2490b9e35456bbd35579b8a8efc241a4b0d Mon Sep 17 00:00:00 2001 From: James Kessler Date: Mon, 12 Aug 2024 18:04:22 -0700 Subject: [PATCH 2/2] Final changes to Makefile. --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2172561..5e3a47b 100644 --- a/Makefile +++ b/Makefile @@ -24,9 +24,11 @@ release: release_linux .ONESHELL: new_version: @read -p "New version: " version; \ - @read -p "Brief description: " description; \ + read -p "Brief description: " description; \ + echo "Version: $$version"; \ + echo "Description: $$description"; \ sed -i '' "s/version:.*/version: $${version}/" shard.yml; \ - sed -i '' "s/VERSION = .*/VERSION = \"$${version}\"/" src/coverage_reporter.cr; \ + sed -i '' "s/VERSION = .*/VERSION = \"$$version\"/" src/coverage_reporter.cr; \ git add shard.yml src/coverage_reporter.cr; \ git commit --message "$${version}: $${description}"; \ git tag --annotate v$${version} --message "$${version}: $${description}"; \