File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ set -o pipefail
11
11
12
12
CURRENT_DIR=" $( dirname " $0 " ) "
13
13
PROJECT_POM=" $CURRENT_DIR /../../../pom.xml"
14
- SPRING_VERSION=" $( grep -FA1 ' <artifactId>spring-boot-starter-parent' " $PROJECT_POM " | sed -n ' /<version>/s|.*>\([^<]\+\)<.*|\1|p ' ) "
14
+ SPRING_VERSION=" $( grep -FA1 ' <artifactId>spring-boot-starter-parent' " $PROJECT_POM " | awk -F ' [<>] ' ' /<version>/{print $3} ' ) "
15
15
SPRING_POM=" https://raw.githubusercontent.com/spring-projects/spring-boot/v$SPRING_VERSION /spring-boot-dependencies/pom.xml"
16
16
17
17
printf " Comparing with Spring Boot %s (project vs spring versions)\\ n\\ n" " $SPRING_VERSION "
18
18
19
19
# I know about useless cat below, but it's here for better readability.
20
20
# shellcheck disable=SC2002
21
21
join \
22
- <( cat " $PROJECT_POM " | sed -n ' /\.version>/s|<\([^>]\+\)>\([^<]\+\)<.*|\1\t\2|p ' | sort) \
23
- <( curl -s " $SPRING_POM " | sed -n ' /\.version>/s|<\([^>]\+\)>\([^<]\+\)<.*|\1\t\2|p ' | sort) \
22
+ <( cat " $PROJECT_POM " | awk -F ' [<>] ' -v OFS= ' \t ' ' $2~/\.version/{print $2, $3} ' | sort) \
23
+ <( curl -s " $SPRING_POM " | awk -F ' [<>] ' -v OFS= ' \t ' ' $2~/\.version/{print $2, $3} ' | sort) \
24
24
| awk '
25
25
{
26
26
if ($2 != $3){
You can’t perform that action at this time.
0 commit comments