Resolving the auto-upgrade issue will allow having edge gems versions with little to no effort. How could you achieve this with CI (specifically CircleCI)?

Automatic update idea

CircleCI provides scheduling jobs and workflows. So you need to configure it to run updating script, which also needs to be prepared. That’s all!

Updating Script

What the script has to do, step by step:

Create and switch to the new branch with an informative title.

2. Update gems (could be only preselected, that based on you) and return update results with messages.

3. Create Pull Request for the new updates.

CIRCLE_PROJECT_USERNAME and CIRCLE_PROJECT_REPONAME — it is CircleCI built-in environment variables.

GITHUB_TOKEN — this variable should be stored manually like CircleCI Environment Variable.

Provide GitHub User name and email (they could have fake values) to have the ability to commit:

git config user.name "jt-deployments"

git config user.email "circleci.bot@example.com"

Finally, the script will look like:

CircleCI configuration

For example, set the script to be invoked once a month at ten o’clock:

Automate everything possible

This way you can not worry about updating the dependencies. Trying to automate such activity helps to save time and increase your productivity. It is good to have more time for creative work.

Link to complete script

You can find this script as well as other optimization tricks in our repository jetthoughts/jt_tools.