From bd83b5742b722c10d09fa818238c0717a1bbc409 Mon Sep 17 00:00:00 2001 From: Chris Herborth Date: Wed, 15 Oct 2025 15:42:01 -0400 Subject: [PATCH 1/2] Fix regex in epoch_sed to ignore anything after the number in an epoch line --- scripts/check-for-epoch-bump.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/check-for-epoch-bump.sh b/scripts/check-for-epoch-bump.sh index 13101c1..f8481a0 100755 --- a/scripts/check-for-epoch-bump.sh +++ b/scripts/check-for-epoch-bump.sh @@ -1,8 +1,8 @@ #!/bin/bash -# Areas of possible improvement: +# Areas of possible improvement: # Check the git remotes to see if this is a package repo -# Exclude certain filenames like "pombump-deps.yaml", related. Probably could be done in the hook config or in the loop. +# Exclude certain filenames like "pombump-deps.yaml", related. Probably could be done in the hook config or in the loop. # Check for at least one argument if [ "$#" -lt 1 ]; then @@ -15,7 +15,7 @@ epoch_grep() { } epoch_sed() { - sed -r 's/^[[:space:]]+epoch:[[:space:]]+([0-9])+/\1/' + sed -r 's/^[[:space:]]+epoch:[[:space:]]+([0-9])+.*$/\1/' } for yaml_file in "$@"; do From 769ddc39eaead8c7d2204b52397e5894b122b56f Mon Sep 17 00:00:00 2001 From: Chris Herborth Date: Thu, 16 Oct 2025 10:19:59 -0400 Subject: [PATCH 2/2] Fix regex to catch epochs > 9 properly --- scripts/check-for-epoch-bump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-for-epoch-bump.sh b/scripts/check-for-epoch-bump.sh index f8481a0..1d745df 100755 --- a/scripts/check-for-epoch-bump.sh +++ b/scripts/check-for-epoch-bump.sh @@ -15,7 +15,7 @@ epoch_grep() { } epoch_sed() { - sed -r 's/^[[:space:]]+epoch:[[:space:]]+([0-9])+.*$/\1/' + sed -r 's/^[[:space:]]+epoch:[[:space:]]+([0-9]+).*$/\1/' } for yaml_file in "$@"; do