Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,22 @@ jobs:
- name: Fetch tags
run: git fetch --tags --force

- name: Generate version file
run: |

# Build the final JSON object
json_string=$(jq -n \
--arg date "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--arg commit_sha "${GITHUB_SHA}" \
--arg commit_tag "$(git describe --tags --abbrev=0 2>/dev/null || echo "untagged")" \
--arg image_name "${{ matrix.name }}" \
--arg image_source "${{ matrix.base_image }}" \
'{build_date: $date, commit_sha: $commit_sha, commit_tag: $commit_tag, image_name: $image_name, image_source: $image_source}')

echo "$json_string"

echo "$json_string" > image-version.json

- name: Install dependencies and build image
uses: photonvision/photon-image-runner@HEAD
id: install_deps
Expand Down
5 changes: 5 additions & 0 deletions install_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ echo "Banner \/etc\/issue.net" > /etc/ssh/sshd_config.d/10_PhotonVisionBanner.co

# Add photon version file
mkdir -p /opt/photonvision/

# Keep this for legacy purposes
# DEPRECATED: removal in 2027
echo "${GITHUB_REF_NAME};${image_name}" > /opt/photonvision/image-version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we leave this here for compatibility with older versions of PhotonVision? If someone installs 2025.3.1 on a newer image, it won't find the version information. Deprecate it and we'll remove it in a future version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, I deprecated it for '27

Copy link
Contributor

@mcm001 mcm001 Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing 2025.3.1 on a newer image won't work for libcamera ABI compat, and I don't think we should be really supporting inter year flashing anyways?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing 2025.3.1 on a newer image won't work for libcamera ABI compat, and I don't think we should be really supporting inter year flashing anyways?

It doesn't hurt though, and it's a good idea to think about backwards-compat.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our images are still defaulting to 2025.3.1 because it's the latest release. Plus, libcamera is only a problem for RPi-based systems. Nothing stopping someone with an OPi from running 2025 on a newer image.


cp -f ./image-version.json /opt/photonvision/image-version.json