aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-07-21 17:30:31 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-07-21 17:30:31 -0300
commit0d9b68879186c5d139a45fca0ae144347b4c6d52 (patch)
tree8aa0d214c6b97d0f13f652bbda7faff8dbf57dc0
parent54adff4e3ba0e31a70f50da76af0f65857fafbf7 (diff)
downloadpuppet-drupal-0d9b68879186c5d139a45fca0ae144347b4c6d52.tar.gz
puppet-drupal-0d9b68879186c5d139a45fca0ae144347b4c6d52.tar.bz2
Fix: updates.drupal.org not working for 9.x
-rwxr-xr-xfiles/drupal12
1 files changed, 8 insertions, 4 deletions
diff --git a/files/drupal b/files/drupal
index bc4b12f..705c209 100755
--- a/files/drupal
+++ b/files/drupal
@@ -173,10 +173,14 @@ function drupal_latest {
series="$LATEST_SERIES"
fi
- latest="`wget -O- -q https://updates.drupal.org/release-history/drupal/${series}.x | grep -oPm1 "(?<=<download_link>)[^<]+" | grep -v -- '-dev' | grep -v -- '-alpha' | grep -v -- '-beta' | grep -v -- '-rc' | head -1`"
- latest="`basename $latest`"
-
- echo $latest | sed -e 's/^drupal-//' -e 's/.tar.gz$//'
+ if [ "$series" == "9" ]; then
+ latest="`wget -O- -q https://www.drupal.org/node/3060/release/feed | grep "<link>" ~/load/feed | grep "releases/9." | cut -d "/" -f 7 | cut -d '<' -f 1 | sort -r | head -1`"
+ echo $latest
+ else
+ latest="`wget -O- -q https://updates.drupal.org/release-history/drupal/${series}.x | grep -oPm1 "(?<=<download_link>)[^<]+" | grep -v -- '-dev' | grep -v -- '-alpha' | grep -v -- '-beta' | grep -v -- '-rc' | head -1`"
+ latest="`basename $latest`"
+ echo $latest | sed -e 's/^drupal-//' -e 's/.tar.gz$//'
+ fi
}
# Deploy a fresh drupal tree