Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Address incompatibility with heroku-22 stack #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vietqhoang
Copy link

@vietqhoang vietqhoang commented Jun 27, 2022

Closes #1

See linked issue above for context.

Replace ruby execution line with bash equivalent. heroku-22 does not include a system ruby anymore, so either bash or python3 must be used for this step. Prioritize using bash to reduce the number of dependencies.

The bash line uses the jq library, which is included in the heroku stack. See documentation.

The result of the jq is a string surrounded by double quotes. We need to trim the double quotes out, else another error is thrown when curl is used on the extracted value. Bash tr is used to do this. The jq output with the raw output flag, -r, does not include surrounding double quotes.

@vietqhoang
Copy link
Author

vietqhoang commented Jun 27, 2022

I can confirm these changes are working in our Heroku apps. The builds are successful, whereas before the build process would stop and raise an error due to the missing Ruby. Reviewing the build logs it is showing the buildpack restoring the cache.

bin/compile Outdated Show resolved Hide resolved
This will do a raw output, which doesn’t include the surrounding double quotes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with heroku-22 stack
1 participant