Browse Source

Update smack-unique-snapshots.sh

pull/12/head
Paul Schaub 5 months ago
parent
commit
836d57d3b3
Signed by: Paul Schaub <vanitasvitae@fsfe.org> GPG Key ID: 62BEE9264BF17311
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      utils/smack-unique-snapshots.sh

+ 9
- 2
utils/smack-unique-snapshots.sh 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

Loading…
Cancel
Save