Skip to content

Commit

Permalink
make regex stronger to match more tags
Browse files Browse the repository at this point in the history
  • Loading branch information
joejstuart committed Jul 22, 2024
1 parent ba1b630 commit f0c6ca1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion hack/build-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ tkn_bundle_push() {
function save_ref() {
local output
output="$(< /dev/stdin)"
echo "${output}"
local digest
digest="$(echo "${output}" | grep -Po '@\K(sha256:[a-f0-9]*)')"

Expand Down
2 changes: 1 addition & 1 deletion spec/hack/bundles_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ eval "$(shellspec - -c) exit 1"

check_tkn_push_url() {
while read -r line; do
if [[ "$line" == quay.io/* ]] && [[ ! "$line" =~ ([0-9]+\.[0-9]-1234)?@sha256:5678$ ]]; then
if [[ "$line" == quay.io/* ]] && [[ ! "$line" =~ ^quay\.io/[a-zA-Z0-9_-]+/[a-zA-Z0-9_-]+:[0-9a-zA-Z\.-]+@sha256:[a-fA-F0-9]+$ ]]; then
return 1
fi
done
Expand Down

0 comments on commit f0c6ca1

Please sign in to comment.