Repository navigation
fix(deps): resolve OpenShell digest lookup #6110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ralphbean
merged 3 commits into
main
from
fix/renovate-openshell-digest-and-ubi-automerge
Aug 18, 2026
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| #!/usr/bin/env bash | ||
| # Called by Renovate postUpgradeTasks after an OpenShell version bump. | ||
| # | ||
| # The github-releases datasource can't resolve a digest for OPENSHELL_SHA | ||
| # directly: Renovate's digest lookup compares the new value against raw | ||
| # GitHub tag names (e.g. "v0.0.103"), but extractVersionTemplate strips the | ||
| # "v" prefix from the value tracked in this file (e.g. "0.0.103"), so the | ||
| # comparison never matches. Instead, this script looks up the commit SHA | ||
| # for the release tag directly and patches it in. | ||
| set -euo pipefail | ||
|
|
||
| FILE=".github/scripts/openshell-version.sh" | ||
|
|
||
| OLD_VERSION=$(git show HEAD:"${FILE}" | grep -oP '^OPENSHELL_VERSION=\K\S+' || true) | ||
| NEW_VERSION=$(grep -oP '^OPENSHELL_VERSION=\K\S+' "${FILE}" || true) | ||
|
|
||
| if [[ -z "${NEW_VERSION}" ]]; then | ||
| echo "error: could not extract OPENSHELL_VERSION from working-tree ${FILE}" >&2 | ||
| exit 1 | ||
| fi | ||
| if [[ ! "${NEW_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "error: NEW_VERSION is not a valid semver: ${NEW_VERSION}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ "${OLD_VERSION}" == "${NEW_VERSION}" ]]; then | ||
| echo "OpenShell version unchanged (${NEW_VERSION}), nothing to do" | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "OpenShell: ${OLD_VERSION:-<none>} -> ${NEW_VERSION}" | ||
|
|
||
| WORKDIR="$(mktemp -d)" | ||
| trap 'rm -rf "${WORKDIR}"' EXIT | ||
|
|
||
| curl -fsSL "https://api.github.com/repos/NVIDIA/OpenShell/commits/v${NEW_VERSION}" \ | ||
|
ralphbean marked this conversation as resolved.
Resolved
ralphbean marked this conversation as resolved.
Resolved
|
||
| -o "${WORKDIR}/commit.json" | ||
|
ralphbean marked this conversation as resolved.
Resolved
ralphbean marked this conversation as resolved.
Resolved
|
||
| SHA=$(grep -m1 -oP '"sha":\s*"\K[0-9a-f]{40}' "${WORKDIR}/commit.json" || true) | ||
|
qodo-code-review[bot] marked this conversation as resolved.
Resolved
ralphbean marked this conversation as resolved.
Resolved
|
||
|
|
||
| if [[ ! "${SHA}" =~ ^[0-9a-f]{40}$ ]]; then | ||
| echo "error: resolved SHA is not a valid 40-char hex commit sha: ${SHA}" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| sed -i "s/^OPENSHELL_SHA=.*/OPENSHELL_SHA=${SHA}/" "${FILE}" | ||
|
|
||
| echo "updated OPENSHELL_SHA to ${SHA} for v${NEW_VERSION}" | ||
|
qodo-code-review[bot] marked this conversation as resolved.
Resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.