Skip to content

Commit

Permalink
allow uppercase chars in builder image name/tag and add mawk to build…
Browse files Browse the repository at this point in the history
… image

Signed-off-by: Logan Bond <lbond@secureworks.com>

remove debug

Signed-off-by: Logan Bond <lbond@secureworks.com>

remove unneeded fmt

Signed-off-by: Logan Bond <lbond@secureworks.com>

tabs

Signed-off-by: Logan Bond <lbond@secureworks.com>
  • Loading branch information
EXONER4TED authored and poiana committed Mar 31, 2023
1 parent c092be2 commit aef0925
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN apt-get update \
gpg \
zstd \
gawk \
mawk \
&& rm -rf /var/lib/apt/lists/*

RUN if [ "$TARGETARCH" = "amd64" ] ; then apt-get install -y --no-install-recommends libmpx2; fi
Expand Down Expand Up @@ -128,4 +129,4 @@ RUN ln -s /usr/bin/gcc-4.8 /usr/bin/gcc-4.8.0
RUN if [ "$TARGETARCH" = "amd64" ] ; then ln -s /usr/bin/gcc-4.9 /usr/bin/gcc-4.9.0; fi;
RUN ln -s /usr/bin/gcc-5 /usr/bin/gcc-5.0.0
RUN ln -s /usr/bin/gcc-6 /usr/bin/gcc-6.0.0
RUN ln -s /usr/bin/gcc-8 /usr/bin/gcc-8.0.0
RUN ln -s /usr/bin/gcc-8 /usr/bin/gcc-8.0.0
6 changes: 4 additions & 2 deletions validate/isimagename.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package validate

import (
"github.com/go-playground/validator/v10"
"strings"
"unicode"

"github.com/go-playground/validator/v10"
)

const letters = "abcdefghijklmnopqrstuvwxyz"
Expand All @@ -14,7 +16,7 @@ func isImageName(fl validator.FieldLevel) bool {
name := fl.Field().String()

for _, c := range name {
if !strings.ContainsRune(alphabet, c) {
if !strings.ContainsRune(alphabet, unicode.ToLower(c)) {
return false
}
}
Expand Down

0 comments on commit aef0925

Please sign in to comment.