I have a create-react-app
and I need an automated way to set an different environment variables before each build.
My goal is to set a code_version
for Rollbar.
I tried the following:
"heroku-prebuild": "heroku config:set REACT_APP_ROLLBAR_CODE_VERSION=test123 && sh upload-source-maps-script.sh"
error message:/bin/sh: 1: config:set: not found
"heroku-prebuild": "sh upload-source-maps-script.sh"
and from within sh fileheroku config:set REACT_APP_ROLLBAR_CODE_VERSION=test123
error: no error message, but config var is not setAlso from within sh file
export REACT_APP_ROLLBAR_CODE_VERSION=test123