mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
update-source-version: Less strict regex for name = ...
lines
This commit is contained in:
parent
0101944621
commit
47acd09fdb
|
@ -44,8 +44,8 @@ oldVersion=$(echo "$oldVersion" | sed -re 's|[.+]|\\&|g')
|
|||
|
||||
if [ $(grep -c -E "^\s*(let\b)?\s*version\s+=\s+\"$oldVersion\"" "$nixFile") = 1 ]; then
|
||||
pattern="/\bversion\b\s*=/ s|\"$oldVersion\"|\"$newVersion\"|"
|
||||
elif [ $(grep -c -E "^\s*(let\b)?\s*name\s+=\s+\"$drvName-$oldVersion\"" "$nixFile") = 1 ]; then
|
||||
pattern="/\bname\b\s*=/ s|\"$drvName-$oldVersion\"|\"$drvName-$newVersion\"|"
|
||||
elif [ $(grep -c -E "^\s*(let\b)?\s*name\s+=\s+\"[^-]+-$oldVersion\"" "$nixFile") = 1 ]; then
|
||||
pattern="/\bname\b\s*=/ s|-$oldVersion\"|-$newVersion\"|"
|
||||
else
|
||||
die "Couldn't figure out where out where to patch in new version in '$attr'!"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue