From 3dda4c4e7d288e23996d10919b57cbc70afcf540 Mon Sep 17 00:00:00 2001 From: Amrutha G Date: Wed, 30 Sep 2026 14:10:00 +0530 Subject: [PATCH 1/3] Support configurable manifest/lock filenames and dev-dependencies --- .github/workflows/reusable-vipm-lock.yml | 26 +++++++--- .github/workflows/reusable-vipm-update.yml | 41 ++++++++++++++-- actions/OpenSourceActions.psm1 | 15 ++++++ dispatchers.json | 33 ++++++++++++- refresh-vipm-lock/action.yml | 10 ++++ scripts/refresh-vipm-lock/RefreshVipmLock.ps1 | 20 ++++++-- .../refresh-vipm-lock/refresh-vipm-lock.sh | 23 +++++++++ .../UpdateVipmDependencies.ps1 | 23 ++++++++- .../update-vipm-dependencies.sh | 48 +++++++++++++++---- update-vipm-dependencies/action.yml | 15 ++++++ 10 files changed, 228 insertions(+), 26 deletions(-) diff --git a/.github/workflows/reusable-vipm-lock.yml b/.github/workflows/reusable-vipm-lock.yml index de2d0d2..51ef332 100644 --- a/.github/workflows/reusable-vipm-lock.yml +++ b/.github/workflows/reusable-vipm-lock.yml @@ -20,6 +20,16 @@ on: required: false type: boolean default: false + manifest_filename: + description: 'Manifest filename (relative to working_directory) to read, e.g. "runner_dependencies.toml".' + required: false + type: string + default: 'vipm.toml' + lock_filename: + description: 'Lock filename (relative to working_directory) to generate/check, e.g. "runner_dependencies.lock".' + required: false + type: string + default: 'vipm.lock' base_branch: description: 'Target branch for the generated pull request.' required: true @@ -47,12 +57,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - uses: ni/open-source/refresh-vipm-lock@users/amrutha/vipm-lock-refresh-and-dependency-update + - uses: ni/open-source/refresh-vipm-lock@actions with: working_directory: ${{ inputs.working_directory }} labview_version: ${{ inputs.labview_version }} labview_bitness: ${{ inputs.labview_bitness }} check_only: ${{ inputs.check_only }} + manifest_filename: ${{ inputs.manifest_filename }} + lock_filename: ${{ inputs.lock_filename }} vipm_serial_number: ${{ secrets.VIPM_SERIAL_NUMBER }} vipm_full_name: ${{ secrets.VIPM_FULL_NAME }} vipm_email: ${{ secrets.VIPM_EMAIL }} @@ -61,19 +73,19 @@ jobs: uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 with: name: vipm-lock - path: ${{ inputs.working_directory }}/vipm.lock + path: ${{ inputs.working_directory }}/${{ inputs.lock_filename }} if-no-files-found: error - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 if: ${{ !inputs.check_only }} with: - commit-message: 'chore(deps): refresh vipm.lock' - title: 'chore(deps): refresh vipm.lock' + commit-message: 'chore(deps): refresh ${{ inputs.lock_filename }}' + title: 'chore(deps): refresh ${{ inputs.lock_filename }}' body: | - Automated `vipm.lock` refresh generated by `ni/open-source`'s reusable + Automated `${{ inputs.lock_filename }}` refresh generated by `ni/open-source`'s reusable `reusable-vipm-lock.yml` workflow. - Review the `vipm.lock` diff before merging. + Review the `${{ inputs.lock_filename }}` diff before merging. base: ${{ inputs.base_branch }} branch: ${{ inputs.pr_branch }} - add-paths: ${{ inputs.working_directory }}/vipm.lock + add-paths: ${{ inputs.working_directory }}/${{ inputs.lock_filename }} labels: ${{ inputs.pr_labels }} \ No newline at end of file diff --git a/.github/workflows/reusable-vipm-update.yml b/.github/workflows/reusable-vipm-update.yml index c344b75..cd8b273 100644 --- a/.github/workflows/reusable-vipm-update.yml +++ b/.github/workflows/reusable-vipm-update.yml @@ -19,6 +19,21 @@ on: description: 'Target branch for the generated pull request in the caller repository.' required: true type: string + manifest_filename: + description: 'Manifest filename (relative to working_directory) to read/update, e.g. "runner_dependencies.toml".' + required: false + type: string + default: 'vipm.toml' + lock_filename: + description: 'Lock filename (relative to working_directory) to regenerate, e.g. "runner_dependencies.lock".' + required: false + type: string + default: 'vipm.lock' + include_dev_dependencies: + description: 'If true, also bumps packages declared under [dev-dependencies] in addition to [dependencies].' + required: false + type: boolean + default: true pr_branch: description: 'Branch name to push dependency updates to.' required: false @@ -55,6 +70,21 @@ on: description: "Optional target branch; defaults to this repository's default branch." required: false type: string + manifest_filename: + description: 'Manifest filename (relative to working_directory) to read/update, e.g. "runner_dependencies.toml".' + required: false + type: string + default: 'vipm.toml' + lock_filename: + description: 'Lock filename (relative to working_directory) to regenerate, e.g. "runner_dependencies.lock".' + required: false + type: string + default: 'vipm.lock' + include_dev_dependencies: + description: 'If true, also bumps packages declared under [dev-dependencies] in addition to [dependencies].' + required: false + type: boolean + default: true pr_branch: description: 'Branch name to push dependency updates to.' required: false @@ -75,11 +105,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - uses: ni/open-source/update-vipm-dependencies@users/amrutha/vipm-lock-refresh-and-dependency-update + - uses: ni/open-source/update-vipm-dependencies@actions with: working_directory: ${{ inputs.working_directory }} labview_version: ${{ inputs.labview_version }} labview_bitness: ${{ inputs.labview_bitness }} + manifest_filename: ${{ inputs.manifest_filename }} + lock_filename: ${{ inputs.lock_filename }} + include_dev_dependencies: ${{ inputs.include_dev_dependencies }} vipm_serial_number: ${{ secrets.VIPM_SERIAL_NUMBER }} vipm_full_name: ${{ secrets.VIPM_FULL_NAME }} vipm_email: ${{ secrets.VIPM_EMAIL }} @@ -91,10 +124,10 @@ jobs: Automated dependency update generated by `ni/open-source`'s reusable `reusable-vipm-update.yml` workflow. - Review the `vipm.toml` / `vipm.lock` diff before merging. + Review the `${{ inputs.manifest_filename }}` / `${{ inputs.lock_filename }}` diff before merging. base: ${{ inputs.base_branch || github.event.repository.default_branch }} branch: ${{ inputs.pr_branch }} add-paths: | - ${{ inputs.working_directory }}/vipm.toml - ${{ inputs.working_directory }}/vipm.lock + ${{ inputs.working_directory }}/${{ inputs.manifest_filename }} + ${{ inputs.working_directory }}/${{ inputs.lock_filename }} labels: ${{ inputs.pr_labels }} \ No newline at end of file diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 01a90c5..9c787f0 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -787,6 +787,8 @@ function Invoke-SetupNipm { # VipmDebUrl: URL for the VIPM Linux .deb package. # DockerImage: Docker image name (default: "nationalinstruments/labview"). # ImageTag: Docker image tag (default: "latest-linux"). +# ManifestFilename: Manifest filename relative to WorkingDirectory (default: "vipm.toml"). +# LockFilename: Lock filename relative to WorkingDirectory (default: "vipm.lock"). # DryRun: If set, prints the command instead of executing it. function Invoke-RefreshVipmLock { [CmdletBinding()] @@ -801,6 +803,8 @@ function Invoke-RefreshVipmLock { [Parameter()] [string] $VipmDebUrl = "https://traffic.libsyn.com/secure/jkinc/vipm_26.3.1-4025_amd64.deb", [Parameter()] [string] $DockerImage = "nationalinstruments/labview", [Parameter()] [string] $ImageTag = "latest-linux", + [Parameter()] [string] $ManifestFilename = "vipm.toml", + [Parameter()] [string] $LockFilename = "vipm.lock", [switch] $DryRun ) Write-Information "Invoking RefreshVipmLock" -InformationAction Continue @@ -827,6 +831,8 @@ function Invoke-RefreshVipmLock { VipmDebUrl = $VipmDebUrl DockerImage = $DockerImage ImageTag = $ImageTag + ManifestFilename = $ManifestFilename + LockFilename = $LockFilename } ` -DryRun:$DryRun @@ -843,6 +849,9 @@ function Invoke-RefreshVipmLock { # VipmDebUrl: URL for the VIPM Linux .deb package. # DockerImage: Docker image name (default: "nationalinstruments/labview"). # ImageTag: Docker image tag (default: "latest-linux"). +# ManifestFilename: Manifest filename relative to WorkingDirectory (default: "vipm.toml"). +# LockFilename: Lock filename relative to WorkingDirectory (default: "vipm.lock"). +# IncludeDevDependencies: If set, also bumps packages declared under [dev-dependencies]. # DryRun: If set, prints the command instead of executing it. function Invoke-UpdateVipmDependencies { [CmdletBinding()] @@ -856,6 +865,9 @@ function Invoke-UpdateVipmDependencies { [Parameter()] [string] $VipmDebUrl = "https://traffic.libsyn.com/secure/jkinc/vipm_26.3.1-4025_amd64.deb", [Parameter()] [string] $DockerImage = "nationalinstruments/labview", [Parameter()] [string] $ImageTag = "latest-linux", + [Parameter()] [string] $ManifestFilename = "vipm.toml", + [Parameter()] [string] $LockFilename = "vipm.lock", + [switch] $IncludeDevDependencies, [switch] $DryRun ) Write-Information "Invoking UpdateVipmDependencies" -InformationAction Continue @@ -881,6 +893,9 @@ function Invoke-UpdateVipmDependencies { VipmDebUrl = $VipmDebUrl DockerImage = $DockerImage ImageTag = $ImageTag + ManifestFilename = $ManifestFilename + LockFilename = $LockFilename + IncludeDevDependencies = $IncludeDevDependencies } ` -DryRun:$DryRun diff --git a/dispatchers.json b/dispatchers.json index 235b5e2..836760e 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -729,7 +729,7 @@ } }, "Invoke-RefreshVipmLock": { - "description": "Generates or checks vipm.lock from vipm.toml using the VIPM CLI in a Linux Docker container. WorkingDirectory: Path (relative to the repo root) containing vipm.toml. LabVIEWVersion: LabVIEW version (YYYY) matching the [project] section of vipm.toml. LabVIEWBitness: \"32\" or \"64\" bitness matching the [project] section of vipm.toml. CheckOnly: If set, checks an existing vipm.lock or generates the initial lock when absent. VipmSerialNumber: VIPM Pro serial number (omit to skip activation). VipmFullName: Name used for VIPM Pro activation. VipmEmail: Email used for VIPM Pro activation. VipmDebUrl: URL for the VIPM Linux .deb package. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (default: \"latest-linux\"). DryRun: If set, prints the command instead of executing it.", + "description": "Generates or checks vipm.lock from vipm.toml using the VIPM CLI in a Linux Docker container. WorkingDirectory: Path (relative to the repo root) containing vipm.toml. LabVIEWVersion: LabVIEW version (YYYY) matching the [project] section of vipm.toml. LabVIEWBitness: \"32\" or \"64\" bitness matching the [project] section of vipm.toml. CheckOnly: If set, checks an existing vipm.lock or generates the initial lock when absent. VipmSerialNumber: VIPM Pro serial number (omit to skip activation). VipmFullName: Name used for VIPM Pro activation. VipmEmail: Email used for VIPM Pro activation. VipmDebUrl: URL for the VIPM Linux .deb package. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (default: \"latest-linux\"). ManifestFilename: Manifest filename relative to WorkingDirectory (default: \"vipm.toml\"). LockFilename: Lock filename relative to WorkingDirectory (default: \"vipm.lock\"). DryRun: If set, prints the command instead of executing it.", "parameters": { "CheckOnly": { "type": "boolean", @@ -763,6 +763,18 @@ "required": false, "description": "LabVIEW version (YYYY) matching the [project] section of vipm" }, + "LockFilename": { + "type": "string", + "required": false, + "default": "vipm.lock", + "description": "Lock filename relative to WorkingDirectory (default: \"vipm" + }, + "ManifestFilename": { + "type": "string", + "required": false, + "default": "vipm.toml", + "description": "Manifest filename relative to WorkingDirectory (default: \"vipm" + }, "VipmDebUrl": { "type": "string", "required": false, @@ -1030,7 +1042,7 @@ } }, "Invoke-UpdateVipmDependencies": { - "description": "Bumps every dependency in vipm.toml to its latest available version and regenerates vipm.lock. WorkingDirectory: Path (relative to the repo root) containing vipm.toml. LabVIEWVersion: LabVIEW version (YYYY) matching the [project] section of vipm.toml. LabVIEWBitness: \"32\" or \"64\" bitness matching the [project] section of vipm.toml. VipmSerialNumber: VIPM Pro serial number (`vipm add` requires Community or Professional edition). VipmFullName: Name used for VIPM Pro activation. VipmEmail: Email used for VIPM Pro activation. VipmDebUrl: URL for the VIPM Linux .deb package. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (default: \"latest-linux\"). DryRun: If set, prints the command instead of executing it.", + "description": "Bumps every dependency in vipm.toml to its latest available version and regenerates vipm.lock. WorkingDirectory: Path (relative to the repo root) containing vipm.toml. LabVIEWVersion: LabVIEW version (YYYY) matching the [project] section of vipm.toml. LabVIEWBitness: \"32\" or \"64\" bitness matching the [project] section of vipm.toml. VipmSerialNumber: VIPM Pro serial number (`vipm add` requires Community or Professional edition). VipmFullName: Name used for VIPM Pro activation. VipmEmail: Email used for VIPM Pro activation. VipmDebUrl: URL for the VIPM Linux .deb package. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (default: \"latest-linux\"). ManifestFilename: Manifest filename relative to WorkingDirectory (default: \"vipm.toml\"). LockFilename: Lock filename relative to WorkingDirectory (default: \"vipm.lock\"). IncludeDevDependencies: If set, also bumps packages declared under [dev-dependencies]. DryRun: If set, prints the command instead of executing it.", "parameters": { "DockerImage": { "type": "string", @@ -1049,6 +1061,11 @@ "default": "latest-linux", "description": "Docker image tag (default: \"latest-linux\")" }, + "IncludeDevDependencies": { + "type": "boolean", + "required": false, + "description": "If set, also bumps packages declared under [dev-dependencies]" + }, "LabVIEWBitness": { "type": "string", "required": false, @@ -1059,6 +1076,18 @@ "required": false, "description": "LabVIEW version (YYYY) matching the [project] section of vipm" }, + "LockFilename": { + "type": "string", + "required": false, + "default": "vipm.lock", + "description": "Lock filename relative to WorkingDirectory (default: \"vipm" + }, + "ManifestFilename": { + "type": "string", + "required": false, + "default": "vipm.toml", + "description": "Manifest filename relative to WorkingDirectory (default: \"vipm" + }, "VipmDebUrl": { "type": "string", "required": false, diff --git a/refresh-vipm-lock/action.yml b/refresh-vipm-lock/action.yml index 0c53d9b..0183400 100644 --- a/refresh-vipm-lock/action.yml +++ b/refresh-vipm-lock/action.yml @@ -14,6 +14,14 @@ inputs: description: 'If true, checks an existing vipm.lock or generates the initial lock when absent.' default: 'false' required: false + manifest_filename: + description: 'Manifest filename (relative to working_directory) to read, e.g. "runner_dependencies.toml".' + default: 'vipm.toml' + required: false + lock_filename: + description: 'Lock filename (relative to working_directory) to generate/check, e.g. "runner_dependencies.lock".' + default: 'vipm.lock' + required: false vipm_serial_number: description: 'VIPM Pro serial number (pass from a secret in the caller).' required: false @@ -60,6 +68,8 @@ runs: VipmDebUrl = '${{ inputs.vipm_deb_url }}' DockerImage = '${{ inputs.docker_image }}' ImageTag = '${{ inputs.image_tag }}' + ManifestFilename = '${{ inputs.manifest_filename }}' + LockFilename = '${{ inputs.lock_filename }}' } if ('${{ inputs.check_only }}' -eq 'true') { $args['CheckOnly'] = $true } $params = @{ diff --git a/scripts/refresh-vipm-lock/RefreshVipmLock.ps1 b/scripts/refresh-vipm-lock/RefreshVipmLock.ps1 index 29e820a..2550ae0 100644 --- a/scripts/refresh-vipm-lock/RefreshVipmLock.ps1 +++ b/scripts/refresh-vipm-lock/RefreshVipmLock.ps1 @@ -37,6 +37,12 @@ .PARAMETER ImageTag Docker image tag. +.PARAMETER ManifestFilename + Manifest filename (relative to WorkingDirectory) to read. Defaults to "vipm.toml". + +.PARAMETER LockFilename + Lock filename (relative to WorkingDirectory) to generate/check. Defaults to "vipm.lock". + .NOTES Leaf script for the 'refresh-vipm-lock' dispatcher action. #> @@ -71,7 +77,13 @@ param( [string]$DockerImage = "nationalinstruments/labview", [Parameter(Mandatory = $false)] - [string]$ImageTag = "latest-linux" + [string]$ImageTag = "latest-linux", + + [Parameter(Mandatory = $false)] + [string]$ManifestFilename = "vipm.toml", + + [Parameter(Mandatory = $false)] + [string]$LockFilename = "vipm.lock" ) Set-StrictMode -Version Latest @@ -96,6 +108,8 @@ try { "--labview-bitness", "'$LabVIEWBitness'" "--check-only", "'$checkOnlyValue'" "--vipm-deb-url", "'$VipmDebUrl'" + "--manifest-filename", "'$ManifestFilename'" + "--lock-filename", "'$LockFilename'" ) $bashCommand = "chmod +x $containerScriptPath && $containerScriptPath $($bashArgs -join ' ')" @@ -119,9 +133,9 @@ try { } if (-not $CheckOnly) { - $lockPath = Join-Path $WorkingDirectory 'vipm.lock' + $lockPath = Join-Path $WorkingDirectory $LockFilename if (-not (Test-Path $lockPath)) { - throw "vipm.lock was not created at $lockPath" + throw "$LockFilename was not created at $lockPath" } } diff --git a/scripts/refresh-vipm-lock/refresh-vipm-lock.sh b/scripts/refresh-vipm-lock/refresh-vipm-lock.sh index 8e8ee67..980bc09 100644 --- a/scripts/refresh-vipm-lock/refresh-vipm-lock.sh +++ b/scripts/refresh-vipm-lock/refresh-vipm-lock.sh @@ -9,6 +9,8 @@ LABVIEW_VERSION="" LABVIEW_BITNESS="" CHECK_ONLY="false" VIPM_DEB_URL="" +MANIFEST_FILENAME="vipm.toml" +LOCK_FILENAME="vipm.lock" while [[ $# -gt 0 ]]; do case "$1" in @@ -17,6 +19,8 @@ while [[ $# -gt 0 ]]; do --labview-bitness) LABVIEW_BITNESS="$2"; shift 2 ;; --check-only) CHECK_ONLY="$2"; shift 2 ;; --vipm-deb-url) VIPM_DEB_URL="$2"; shift 2 ;; + --manifest-filename) MANIFEST_FILENAME="$2"; shift 2 ;; + --lock-filename) LOCK_FILENAME="$2"; shift 2 ;; *) echo "error: unknown argument '$1'" >&2; exit 2 ;; esac done @@ -61,6 +65,25 @@ fi cd "$WORKING_DIRECTORY" +# vipm's CLI only recognizes vipm.toml/vipm.lock in the CWD; stage custom +# filenames under those names for the duration of the vipm calls. +restore_filenames() { + if [ "$MANIFEST_FILENAME" != "vipm.toml" ] && [ -f vipm.toml ]; then + mv vipm.toml "$MANIFEST_FILENAME" + fi + if [ "$LOCK_FILENAME" != "vipm.lock" ] && [ -f vipm.lock ]; then + mv vipm.lock "$LOCK_FILENAME" + fi + return 0 +} +trap restore_filenames EXIT +if [ "$MANIFEST_FILENAME" != "vipm.toml" ] && [ -f "$MANIFEST_FILENAME" ]; then + mv "$MANIFEST_FILENAME" vipm.toml +fi +if [ "$LOCK_FILENAME" != "vipm.lock" ] && [ -f "$LOCK_FILENAME" ]; then + mv "$LOCK_FILENAME" vipm.lock +fi + # Clean runner has no repository cache; populate it for this project's LabVIEW # target before lock resolution (see docs.vipm.io/cli/command-reference#vipm-refresh). vipm refresh --labview-version "$LABVIEW_VERSION" --labview-bitness "$LABVIEW_BITNESS" diff --git a/scripts/update-vipm-dependencies/UpdateVipmDependencies.ps1 b/scripts/update-vipm-dependencies/UpdateVipmDependencies.ps1 index 099558f..03df90c 100644 --- a/scripts/update-vipm-dependencies/UpdateVipmDependencies.ps1 +++ b/scripts/update-vipm-dependencies/UpdateVipmDependencies.ps1 @@ -36,6 +36,15 @@ .PARAMETER ImageTag Docker image tag. +.PARAMETER ManifestFilename + Manifest filename (relative to WorkingDirectory) to read/update. Defaults to "vipm.toml". + +.PARAMETER LockFilename + Lock filename (relative to WorkingDirectory) to regenerate. Defaults to "vipm.lock". + +.PARAMETER IncludeDevDependencies + If set, also bumps packages declared under [dev-dependencies] in addition to [dependencies]. + .NOTES Leaf script for the 'update-vipm-dependencies' dispatcher action. #> @@ -67,7 +76,16 @@ param( [string]$DockerImage = "nationalinstruments/labview", [Parameter(Mandatory = $false)] - [string]$ImageTag = "latest-linux" + [string]$ImageTag = "latest-linux", + + [Parameter(Mandatory = $false)] + [string]$ManifestFilename = "vipm.toml", + + [Parameter(Mandatory = $false)] + [string]$LockFilename = "vipm.lock", + + [Parameter(Mandatory = $false)] + [switch]$IncludeDevDependencies ) Set-StrictMode -Version Latest @@ -89,6 +107,9 @@ try { "--labview-version", "'$LabVIEWVersion'" "--labview-bitness", "'$LabVIEWBitness'" "--vipm-deb-url", "'$VipmDebUrl'" + "--manifest-filename", "'$ManifestFilename'" + "--lock-filename", "'$LockFilename'" + "--include-dev-dependencies", "'$(if ($IncludeDevDependencies) { 'true' } else { 'false' })'" ) $bashCommand = "chmod +x $containerScriptPath && $containerScriptPath $($bashArgs -join ' ')" diff --git a/scripts/update-vipm-dependencies/update-vipm-dependencies.sh b/scripts/update-vipm-dependencies/update-vipm-dependencies.sh index 3d4d908..b63671b 100644 --- a/scripts/update-vipm-dependencies/update-vipm-dependencies.sh +++ b/scripts/update-vipm-dependencies/update-vipm-dependencies.sh @@ -1,15 +1,18 @@ #!/usr/bin/env bash -# Bumps every dependency declared in vipm.toml's [dependencies] table to its -# latest available version (vipm add with no version suffix resolves to -# latest per docs.vipm.io/cli/command-reference#vipm-add), then regenerates -# vipm.lock. Executed inside the VIPM Linux container by -# UpdateVipmDependencies.ps1. +# Bumps every dependency declared in vipm.toml's [dependencies] table (and, +# when requested, [dev-dependencies]) to its latest available version +# (vipm add with no version suffix resolves to latest per +# docs.vipm.io/cli/command-reference#vipm-add), then regenerates vipm.lock. +# Executed inside the VIPM Linux container by UpdateVipmDependencies.ps1. set -euo pipefail WORKING_DIRECTORY="" LABVIEW_VERSION="" LABVIEW_BITNESS="" VIPM_DEB_URL="" +MANIFEST_FILENAME="vipm.toml" +LOCK_FILENAME="vipm.lock" +INCLUDE_DEV_DEPENDENCIES="false" while [[ $# -gt 0 ]]; do case "$1" in @@ -17,6 +20,9 @@ while [[ $# -gt 0 ]]; do --labview-version) LABVIEW_VERSION="$2"; shift 2 ;; --labview-bitness) LABVIEW_BITNESS="$2"; shift 2 ;; --vipm-deb-url) VIPM_DEB_URL="$2"; shift 2 ;; + --manifest-filename) MANIFEST_FILENAME="$2"; shift 2 ;; + --lock-filename) LOCK_FILENAME="$2"; shift 2 ;; + --include-dev-dependencies) INCLUDE_DEV_DEPENDENCIES="$2"; shift 2 ;; *) echo "error: unknown argument '$1'" >&2; exit 2 ;; esac done @@ -61,12 +67,36 @@ fi cd "$WORKING_DIRECTORY" +# vipm's CLI only recognizes vipm.toml/vipm.lock in the CWD; stage custom +# filenames under those names for the duration of the vipm calls. +restore_filenames() { + if [ "$MANIFEST_FILENAME" != "vipm.toml" ] && [ -f vipm.toml ]; then + mv vipm.toml "$MANIFEST_FILENAME" + fi + if [ "$LOCK_FILENAME" != "vipm.lock" ] && [ -f vipm.lock ]; then + mv vipm.lock "$LOCK_FILENAME" + fi + return 0 +} +trap restore_filenames EXIT +if [ "$MANIFEST_FILENAME" != "vipm.toml" ] && [ -f "$MANIFEST_FILENAME" ]; then + mv "$MANIFEST_FILENAME" vipm.toml +fi +if [ "$LOCK_FILENAME" != "vipm.lock" ] && [ -f "$LOCK_FILENAME" ]; then + mv "$LOCK_FILENAME" vipm.lock +fi + vipm refresh --labview-version "$LABVIEW_VERSION" --labview-bitness "$LABVIEW_BITNESS" -# Extract dependency names from the [dependencies] table (stops at the next [section]). -mapfile -t deps < <(awk ' - /^\[dependencies\]/ { in_section=1; next } - /^\[/ { in_section=0 } +# Extract dependency names from [dependencies] (and, when requested, +# [dev-dependencies]); stops each section at the next [section]. +wanted_sections="dependencies" +if [ "$INCLUDE_DEV_DEPENDENCIES" = "true" ]; then + wanted_sections="dependencies dev-dependencies" +fi +mapfile -t deps < <(awk -v sections="$wanted_sections" ' + BEGIN { n = split(sections, arr, " "); for (i = 1; i <= n; i++) wanted["[" arr[i] "]"] = 1 } + /^\[/ { in_section = ($0 in wanted); next } in_section && NF { split($0, parts, "="); gsub(/[ \t"]/, "", parts[1]); if (parts[1] != "") print parts[1] } ' vipm.toml) diff --git a/update-vipm-dependencies/action.yml b/update-vipm-dependencies/action.yml index 6f4fd84..db8ec39 100644 --- a/update-vipm-dependencies/action.yml +++ b/update-vipm-dependencies/action.yml @@ -19,6 +19,18 @@ inputs: vipm_email: description: 'Email used for VIPM Pro activation.' required: false + manifest_filename: + description: 'Manifest filename (relative to working_directory) to read/update, e.g. "runner_dependencies.toml".' + default: 'vipm.toml' + required: false + lock_filename: + description: 'Lock filename (relative to working_directory) to regenerate, e.g. "runner_dependencies.lock".' + default: 'vipm.lock' + required: false + include_dev_dependencies: + description: 'If true, also bumps packages declared under [dev-dependencies] in addition to [dependencies].' + default: true + required: false vipm_deb_url: description: 'Override URL for the VIPM Linux .deb package.' default: 'https://traffic.libsyn.com/secure/jkinc/vipm_26.3.1-4025_amd64.deb' @@ -56,7 +68,10 @@ runs: VipmDebUrl = '${{ inputs.vipm_deb_url }}' DockerImage = '${{ inputs.docker_image }}' ImageTag = '${{ inputs.image_tag }}' + ManifestFilename = '${{ inputs.manifest_filename }}' + LockFilename = '${{ inputs.lock_filename }}' } + if ('${{ inputs.include_dev_dependencies }}' -eq 'true') { $args['IncludeDevDependencies'] = $true } $params = @{ ActionName = 'update-vipm-dependencies' Args = $args From 42cce6c39cccf50e4a496a0087fcfa03c1a67604 Mon Sep 17 00:00:00 2001 From: Amrutha G Date: Wed, 30 Sep 2026 14:27:31 +0530 Subject: [PATCH 2/3] Temporarily point composite action refs at this branch for testing --- .github/workflows/reusable-vipm-lock.yml | 2 +- .github/workflows/reusable-vipm-update.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-vipm-lock.yml b/.github/workflows/reusable-vipm-lock.yml index 51ef332..6fe7943 100644 --- a/.github/workflows/reusable-vipm-lock.yml +++ b/.github/workflows/reusable-vipm-lock.yml @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - uses: ni/open-source/refresh-vipm-lock@actions + - uses: ni/open-source/refresh-vipm-lock@users/amrutha/vipm-custom-manifest-support # TODO: revert to @actions before merging with: working_directory: ${{ inputs.working_directory }} labview_version: ${{ inputs.labview_version }} diff --git a/.github/workflows/reusable-vipm-update.yml b/.github/workflows/reusable-vipm-update.yml index cd8b273..04e0fcb 100644 --- a/.github/workflows/reusable-vipm-update.yml +++ b/.github/workflows/reusable-vipm-update.yml @@ -105,7 +105,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 - - uses: ni/open-source/update-vipm-dependencies@actions + - uses: ni/open-source/update-vipm-dependencies@users/amrutha/vipm-custom-manifest-support # TODO: revert to @actions before merging with: working_directory: ${{ inputs.working_directory }} labview_version: ${{ inputs.labview_version }} From e63529f16336418cec9051d75797f14cb9884eff Mon Sep 17 00:00:00 2001 From: Amruthasinchanag <310877434+Amruthasinchanag@users.noreply.github.com> Date: Wed, 30 Sep 2026 09:28:16 +0000 Subject: [PATCH 3/3] chore(deps): update VIPM package dependencies --- scripts/apply-vipc/vipm.lock | 11 ++++++----- scripts/apply-vipc/vipm.toml | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/apply-vipc/vipm.lock b/scripts/apply-vipc/vipm.lock index 6e6acd8..c790d72 100644 --- a/scripts/apply-vipc/vipm.lock +++ b/scripts/apply-vipc/vipm.lock @@ -1,8 +1,9 @@ +# This file is automatically generated by vipm. # It is not intended for manual editing. version = 2 revision = 0 -updated-at = "2026-09-28T11:20:23.409677154Z" +updated-at = "2026-09-30T09:28:15.715460586Z" requires-labview = "2021" labview-bitness = 64 @@ -12,13 +13,13 @@ uri = "http://www.jkisoft.com/packages" [[package]] name = "astemes_lib_lunit" -version = "1.10.7.3" +version = "2.0.13.6" manager = "vipm" resolution-source = "repo" [[package.source]] repo = "VIPM Community" -checksum = "md5:0eec735c67849e00bacb792d90030318" +checksum = "md5:57bc42bcfdfcf898ef5e00651992a015" [[package]] name = "hse_lib_git_api" @@ -138,7 +139,7 @@ checksum = "md5:777dcc49eebb8062cd69eb0db806df1a" [[package]] name = "sas_workshops_lib_lunit_for_g_cli" -version = "1.1.1.54" +version = "1.2.1.85" manager = "vipm" dependencies = [ "astemes_lib_lunit", @@ -148,7 +149,7 @@ resolution-source = "repo" [[package.source]] repo = "VIPM Community" -checksum = "md5:58fa03e58052b1813d209fc92a748640" +checksum = "md5:c207b10fbd29d739292a672bc097c4b0" [[package]] name = "sas_workshops_lib_lvbuildspec_for_g_cli" diff --git a/scripts/apply-vipc/vipm.toml b/scripts/apply-vipc/vipm.toml index bd6a733..417d8af 100644 --- a/scripts/apply-vipc/vipm.toml +++ b/scripts/apply-vipc/vipm.toml @@ -4,7 +4,7 @@ labview-version = 2021 labview-bitness = 64 [dependencies] -astemes_lib_lunit = "1.10.7.3" +astemes_lib_lunit = "2.0.13.6" hse_lib_git_api = "2.3.4.176" jki_lib_serialization = "1.0.1.14" jki_lib_state_machine = "2024.0.3.23" @@ -16,7 +16,7 @@ oglib_error = "6.0.0.26" oglib_file = "6.0.2.28" oglib_lvdata = "6.0.0.45" oglib_lvzip = "5.0.9-1" -sas_workshops_lib_lunit_for_g_cli = "1.1.1.54" +sas_workshops_lib_lunit_for_g_cli = "1.2.1.85" sas_workshops_lib_lvbuildspec_for_g_cli = "1.2.1.104" sas_workshops_lib_vipb_builder_for_g_cli = "1.1.6.46" -wiresmith_technology_lib_g_cli = "3.0.1.98" \ No newline at end of file +wiresmith_technology_lib_g_cli = "3.0.1.98"