mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-21 08:11:05 -05:00
chore: simplified awk usage for version extraction (#5893)
This commit is contained in:
parent
c9116aac88
commit
dd646d7b7f
4 changed files with 7 additions and 4 deletions
|
@ -75,7 +75,10 @@ new tool needs in the `PATH`, and the expected version command:
|
|||
`build.gradle`. Example:
|
||||
|
||||
```sh
|
||||
GOOGLE_JAVA_FORMAT_VERSION="$(grep <"google-java-format/build.gradle" "google-java-format" | awk -F ':' '{print $3}' | tr -d "'")"
|
||||
GOOGLE_JAVA_FORMAT_VERSION="$(
|
||||
set -euo pipefail
|
||||
awk -F "[:']" '/google-java-format/ {print $4}' "google-java-format/build.gradle"
|
||||
)"
|
||||
```
|
||||
|
||||
6. Add the new to DependaBot configuration:
|
||||
|
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
|
||||
CHECKSTYLE_VERSION="$(
|
||||
set -euo pipefail
|
||||
grep <"checkstyle/build.gradle" "checkstyle" | awk -F ':' '{print $3}' | tr -d "'"
|
||||
awk -F "[:']" '/checkstyle/ {print $4}' "checkstyle/build.gradle"
|
||||
)"
|
||||
echo "Installing Checkstyle: ${CHECKSTYLE_VERSION}"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
|
||||
GOOGLE_JAVA_FORMAT_VERSION="$(
|
||||
set -euo pipefail
|
||||
grep <"google-java-format/build.gradle" "google-java-format" | awk -F ':' '{print $3}' | tr -d "'"
|
||||
awk -F "[:']" '/google-java-format/ {print $4}' "google-java-format/build.gradle"
|
||||
)"
|
||||
echo "Installing Google Java Format: ${GOOGLE_JAVA_FORMAT_VERSION}"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
|||
|
||||
KTLINT_VERSION="$(
|
||||
set -euo pipefail
|
||||
grep <"ktlint/build.gradle" "ktlint" | awk -F ':' '{print $3}' | tr -d "'"
|
||||
awk -F "[:']" '/ktlint/ {print $4}' "ktlint/build.gradle"
|
||||
)"
|
||||
echo "Installing Ktlint: ${KTLINT_VERSION}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue