chiark / gitweb /
update-versions: Update in dependencies too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Apr 2021 21:04:25 +0000 (22:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 18 Apr 2021 21:29:52 +0000 (22:29 +0100)
This should help with publication I think.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
update-versions

index a581bca509addf235f7a557f713e1c2c62c888ce..f25c7b562a2d98644ef46125a406a7ae4de2045d 100755 (executable)
@@ -30,6 +30,10 @@ for f in $files; do
         if (m{^\[package\]\s*$}...m{^\[}) {
           $y=1 if s{^version=".*}{version="'$version'"};
         }
+       if (m{^\[dependencies\]\s*$}...m{^\[}) {
+            s{^(otter[-\w]*)\.path=.*}{$&\n$1.version="'$version'"};
+            s{^(otter[-\w]*)\.version.*\n}{};
+        }
         END { $y or die "appropriate line not found in '$f'" }
     ' "$f"
 done