Update smack-unique-snapshots.sh

This commit is contained in:
Paul Schaub 2019-06-10 17:40:16 +02:00
parent ead5ef6ae3
commit 836d57d3b3
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 9 additions and 2 deletions

View File

@ -21,19 +21,26 @@ VERSIONS=()
for d in `ls` ; do
if [[ -d $d ]]; then
PRO=$(wget -q "$SMACK/$d/$VERSION?C=M;O=D" -O- | grep -Po '(?<=a href=").*?(?=\.pom")' | head -n1);
# Repair missing projects
if [ ${#PRO} -le ${#d} ]; then
PRO="$d MISSING"
fi
echo $PRO
PROJECTS+=("$PRO")
echo $PRO
# Gradle dependency generation
# Determine snapshot version string, which begins after project name
PROJ_LEN=$((${#d} + 1))
SNAP=${PRO:$PROJ_LEN}
# Make project name camelcase and append version string
VER="$(echo $d | sed -r 's/(^|-)(\w)/\U\2/g')Version = \"$SNAP\""
VERSIONS+=("$VER")
# Append to array with first char lower case'd
VERSIONS+=("${VER,}")
fi
done
# print out block of gradle dependecy versions
printf "\n"
echo "Gradle Versions:"
for v in "${VERSIONS[@]}"; do