Open gpertzov opened 4 years ago
Hi,
After digging in, it looks like the patch file provided included some additional changes that were not marked as such, hence git apply command is throwing an error:
< elsif context.request.path == "/health"
< context.response.content_type = "text/plain"
< context.response.print "Healthy!"
< --
> elsif context.request.path == "/crystal/api" || context.request.path == "/crystal/api/"
> context.response.content_type = "application/json"
> context.response.print %Q({"from":"Crystal backend", "message": "#{az_message}", "commit": "#{code_hash.chomp}"})
> --
I will create a pull request to get this addressed. In the mean time, you could simply replace lines 49-51 in the add_time_ms.patch file with lines 29-31 from server.cr file:
elsif context.request.path == "/crystal/api" || context.request.path == "/crystal/api/"
context.response.content_type = "application/json"
context.response.print %Q({"from":"Crystal backend", "message": "#{az_message}", "commit": "#{code_hash.chomp}"})
Please note: the source file is using tabs while the patch is using spaces, so run the git apply command by adding the --ignore-whitespace switch:
git -C ~/environment/ecsdemo-crystal apply add_time_ms.patch --ignore-whitespace
Hope it helps
Applying add_time_ms.patch as appears in https://www.appmeshworkshop.com/deployment/updatecrystal/ Results in the "patch does not apply" error