From 86296ba0a6e144da20a81b0b1f3f767dd751cba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20James?= Date: Thu, 15 Jan 2026 18:27:43 +0100 Subject: [PATCH] update-octave-packages: update tag instead of rev --- maintainers/scripts/update-octave-packages | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/maintainers/scripts/update-octave-packages b/maintainers/scripts/update-octave-packages index 00a1646184d5..49ff2ef71e6b 100755 --- a/maintainers/scripts/update-octave-packages +++ b/maintainers/scripts/update-octave-packages @@ -351,20 +351,20 @@ def _update_package(path, target): text = _replace_value('hash', sri_hash, text) if fetcher == 'fetchFromGitHub': - # in the case of fetchFromGitHub, it's common to see `rev = version;` or `rev = "v${version}";` + # in the case of fetchFromGitHub, it's common to see `tag = version;` or `tag = "v${version}";` # in which no string value is meant to be substituted. However, we can just overwrite the previous value. - regex = '(rev\s+=\s+[^;]*;)' + regex = '(tag\s+=\s+[^;]*;)' regex = re.compile(regex) matches = regex.findall(text) n = len(matches) if n == 0: - raise ValueError("Unable to find rev value for {}.".format(pname)) + raise ValueError("Unable to find tag value for {}.".format(pname)) else: - # forcefully rewrite rev, incase tagging conventions changed for a release + # forcefully rewrite tag, incase tagging conventions changed for a release match = matches[0] - text = text.replace(match, f'rev = "refs/tags/{prefix}${{version}}";') - # incase there's no prefix, just rewrite without interpolation + text = text.replace(match, f'tag = "{prefix}${{version}}";') + # in case there's no prefix, just rewrite without interpolation text = text.replace('"${version}";', 'version;') with open(path, 'w') as f: