Best way to automatically push saves to repo

So I’ve been trying to set up version control for Ignition. I’ve been following this article for setting it up properly.. I chose to employ the Shared Development Environment strategy (there is a dedicated dev server that all devs work on, its connected to the development branch).

I am on step 5 of the GitLab example. I have created the script for automatically pushing changes on save (as seen below), and the Update Gateway event script executes the script on save.

NOW=$(date +"%m-%d-%Y %H:%M:%S")
git add .
git commit -m "Designer save @ $NOW"
git push origin

My question: Is there a way I can pass along some parameters for the commit message?

Lets say I want to add the username to it so I can track who made the change. I dont see a way of doing that using the Update Gateway event script. Is there possibly a better way of conducting automatic pushing to the development branch?

Presently, no. We have plans to provide more parameters/information to the project update script hook (resources that were modified, username(s), etc, if possible) - not completely locked down yet, but something along those lines.

1 Like

Thanks for the info! I’ll keep an eye out for this in the change logs then.

To add to the list, is the “origin” of the update, i.e. “Designer Save” or “External” (meaning from the filesystem), etc… Being able to filter actions for certain origins/sources would really help for a lot of scenarios using external version control to migrate changes across different environments.

1 Like