Skip to content

Commit

Permalink
[FLINK-20532] Use proper 'sed' in updated docker image + extend regex…
Browse files Browse the repository at this point in the history
… to catch java8/11

This closes apache#46
  • Loading branch information
rmetzger committed Dec 9, 2020
1 parent 041ac78 commit 11221b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions generate-stackbrew-library-docker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/usr/bin/env bash

# How to recreate below docker image
#
# $ cat Dockerfile
# FROM ubuntu:16.04
# RUN apt-get update ; apt-get install -y git bash
#
# $ docker build -t rmetzger/git-and-bash:latest .
# $ docker push rmetzger/git-and-bash:latest
#

exec docker run --rm \
--volume "${PWD}:/build:ro" \
rmetzger/git-and-bash:latest \
Expand Down
6 changes: 3 additions & 3 deletions generate-stackbrew-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pruneTags() {
# tags contains latest version. keep "latest" tag
echo $tags
else
# remove "latest" and any "scala_" tag, unless it is the latest version
# the "scala_" tag has a similar semantic as the "latest" tag in docker registries.
echo $tags | sed -E 's|, (scala\|latest)[-_.[:alnum:]]*||g'
# remove "latest", any "scala_" or "javaXX" tag, unless it is the latest version
# the "scala" / "java" tags have a similar semantic as the "latest" tag in docker registries.
echo $tags | sed -E 's|, (scala\|latest\|java[0-9]{1,2})[-_.[:alnum:]]*||g'
fi
}

Expand Down

0 comments on commit 11221b1

Please sign in to comment.