Project Library script version control

For Project Library scripts - is there any way to revert a change without producing a new change in the script’s resource.json file?

If I make a change to a project script, and then roll it back using version control, the file and resource.json file will temporarily revert to the old version. A few seconds later, the resource.json file gets updated with a new timestamp.

Also, is there a way to turn off auto commit for project library scripts?

Roll back the resources.json file too. It contains a timestamp and signature for the contents of the resource that you’re causing to be invalid by only rolling back That’s why you see it update next time the project system sees a filesystem change.

Not sure what you mean by this one.

Great thanks, rolling back both solves my problem.

I’m resurrecting this thread and calling it unsolved. Frequently, I’m not able to roll back both files. I captured a screenshot video of the problem. The problem is intermittent - sometimes the resource.json file resets without issue. If it does fail to reset, then its there for good. I usually end up committing “no change, resource.json update”. Any ideas @Kevin.Herron?

The problem was related to the autocrlf setting in my repository. I’m using Windows and had it set to true. Solved by adding this line to my .gitattributes file.

ignition/script-python/** text eol=lf

Here’s the full .gitattributes file I’m using for the project.


Sorry to resurrect an old thread, but we still struggle with this. When Git changes the line endings it causes issues. Why not just add

*.json text eol=lf
*.py text eol=lf

in the attributes file? Then Git will leave them as ignition writes them out, right?

Yup that works most of the time if you use a single gateway for development. If you develop on multiple gateways, you’ll still run into problems though.