add latest version generic support
This commit is contained in:
@ -1,8 +1,16 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
tag=`curl --silent "https://api.github.com/repos/Checkmarx/kics/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`
|
||||
|
||||
echo 'latest tag is' $tag
|
||||
|
||||
version=`echo $tag | sed -r 's/^.{1}//'`
|
||||
|
||||
echo 'version is' $version
|
||||
|
||||
echo "Downloading latest kics binaries"
|
||||
|
||||
wget -c https://github.com/Checkmarx/kics/releases/latest/download/kics_1.0.0_linux_x64.tar.gz -O - | tar -xz
|
||||
wget -c "https://github.com/Checkmarx/kics/releases/download/${tag}/kics_${version}_linux_x64.tar.gz" -O - | tar -xz
|
||||
|
||||
echo "about to scan directory" $INPUT_DIRECTORY
|
||||
|
||||
|
Reference in New Issue
Block a user