Skip to content

Install from latest GitHub release and show Installed vs PLC version on the HMI - #37

Merged
dalethomas81 merged 4 commits into
mainfrom
dev
Sep 12, 2026
Merged

dalethomas81 merged 4 commits into
mainfrom
dev

Conversation

@dalethomas81

Copy link
Copy Markdown
Owner

Summary

curl | bash now clones the latest GitHub release (not main). The HMI shows both that installer tag and the compiled PLC stamp so a mixed box is obvious. PRs into main must re-export ArfBot.xml and bump GVL_Version.sPlcVersion.

Installer

  • install-pi.sh still curls the script from main, then clones releases/latest (same tree as the source zip).
  • --ref main for tip-of-tree; --ref <tag> to pin; --ref latest is the default.
  • Writes /var/opt/codesys/PlcLogic/Application/RELEASE (one line) before re-exec so an older cloned installer still leaves the file.
  • Verified on a Pi: clone and RELEASE were v2.2026.37.0-RobotAnimator.

Wiki curl line does not change. After this is on main and a new release is cut, that curl installs the new release.

HMI

  • Installer = Application/RELEASE via SysFile in M_Init (MemUtils.MemCpy into the STRING; length at ADR - 1).
  • PLC = GVL_Version.sPlcVersion (git describe --tags --always, currently v2.2026.37.0-RobotAnimator-7-gcb5df5e).
  • Label: Installer <tag> PLC <describe>.

PR gate

.github/workflows/plc-gate.yml on PRs to main:

  • Codesys/ArfBot.xml must differ from main.
  • If ArfBot.project changed, XML must have changed too.
  • sPlcVersion must exist, not be unknown, and not match main.

Enable Settings → Branches → main → require status check PLC export and version stamp so it actually blocks merge.

Test

  • Fresh curl | bash (no --ref) clones the current latest release, not main.
  • cat /var/opt/codesys/PlcLogic/Application/RELEASE matches that tag.
  • After download + app restart, HMI shows Installer = that tag and PLC = the describe you stamped.
  • --ref main still tracks tip-of-tree.

curl still fetches install-pi.sh from main so installer fixes ship immediately. The clone now uses releases/latest (same tree as the source zip) unless --ref / ARFBOT_REF is set. --ref main tracks tip-of-tree.
The installer records the git tag (or git describe from a checkout) as a one-line file the PLC can read with SysFile as Application/RELEASE. Written before re-exec so an older cloned installer still leaves the file.
PRs into main fail unless Codesys/ArfBot.xml differs from main, ArfBot.project changes are paired with an XML export, and GVL_Version.sPlcVersion is set and not equal to main.
@dalethomas81
dalethomas81 merged commit 06119e5 into main Sep 12, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant