RevInfo

What is RevInfo?

RevInfo automatically creates Git commit data and Automation Studio build information in a variable declaration file you can use within your Automation Studio project.
It makes clear what committed version of code is running and who transfered it (+when!) to ensure you’ll never walk away from a machine with uncommited code, ever again.
Automation Studio variable file with Git information

Download

The download below is a package which can be imported directly into an Automation Studio project via File -> Import.

RevInfo Download: RevInfo.zip - Version 1.0.0

RevInfo Walk Through and Git Tutorials

RevInfo Walk Through: Using RevInfo (6:20) - Step by Step importing RevInfo into Automation Studio, adding it to your project, and configuring Git.

New to Git and Automation Studio? Git for PLCs is Loupe’s video series on using Automation Studio and version control with Git.

Documentation & Use

Documentation is commented within the getRevInfo.sh script as well.

  1. RevInfo requires a prebuild option in Automation Studio in EACH CONFIGURATION to retrieve status information from Git & Automation Studio.

    Navigate to via: Project (Menu) -> Change Runtime Version (dropdown) -> Build Events (tab) -> Prebuild (field)

    The entire following line should be put into the pre-build step of EACH CONFIGURATION that should run this script.

    "$(AS_PROJECT_PATH)\Logical\RevInfo\getRevInfo.sh" “$(AS_PROJECT_PATH)\Logical\RevInfo” “$(AS_CONFIGURATION)” “$(AS_USER_NAME)”

  2. Add an empty RevInfo.var to the RevInfo package in Automation Studio, if it doesn’t already exist.

  3. Add *RevInfo.var to your .gitignore file.

  4. Ensure that .sh files are executed by Git by default.

    Nagivate to the folder that contains this .sh file -> Right Click -> Open With -> Choose another app -> Select Git and check ‘always use this app to open .sh files’ box

Made by Loupe