always download all
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Paul J Stevens 2023-10-29 13:46:15 +01:00
parent a984f7b65d
commit 894ad1937a
1 changed files with 10 additions and 20 deletions

View File

@ -3,55 +3,45 @@ set -e
version=5.64.0
TMP_DIR=${TMP_DIR:-$PWD/tmp/}
WP_BASE=${1:-$PWD/wordpress/}
function download_ext {
# work-around for timeout issues on lab.civicrm.org during download
name="$1"
url="$2"
echo -n "check ${name}..."
mkdir -p ${name}
if [ -d "$name" ]; then
echo "skip $name"
return
fi
mkdir -p ${TMP_DIR}/${name}
filename=${TMP_DIR}/${name}/$(basename $url)
filename=${name}/$(basename $url)
if [ ! -e $filename ]; then
echo "download_ext $filename $@"
echo curl -L --output $filename $url
curl -L --output $filename $url
else
echo "skip download: $filename $url"
fi
filetype=$(file --brief --mime $filename|cut -f1 -d';'|cut -f2 -d/)
case $filetype in
zip)
unzip -q $filename
unzip -oq -d $name $filename
;;
gzip)
tar xf $filename
return
;;
esac
dirname=$(find -maxdepth 1 -name "${name}*" -type d)
dirname=$(find ${name} -mindepth 1 -maxdepth 1 -name "${name}*" -type d )
echo "$dirname"
[ -z "$dirname" ] && return
dirname=$(basename $dirname)
[ "$dirname" = "$name" ] || mv -v $dirname $name
mv -v $dirname ${name}.tmp && rm -rf $name && mv -v ${name}.tmp $name
}
mkdir -p $TMP_DIR
mkdir -p ${WP_BASE}/wp-content/plugins
rm -rf ${WP_BASE}/wp-content/uploads/civicrm/ext
mkdir -p ${WP_BASE}/wp-content/uploads/civicrm/ext
# clone BIJ1 specific extensions
git config --global pull.ff only
# download all extensions
cd $WP_BASE/wp-content/plugins
download_ext wp-2fa https://downloads.wordpress.org/plugin/wp-2fa.2.4.1.zip
@ -72,6 +62,7 @@ for repo in bij1migratie bij1rules bij1algemeen; do
done
download_ext org.project60.sepa https://github.com/Project60/org.project60.sepa/archive/refs/tags/1.9.1.zip
download_ext de.systopia.identitytracker https://github.com/systopia/de.systopia.identitytracker/releases/download/1.3/de.systopia.identitytracker-1.3.zip
download_ext org.project60.banking https://github.com/Project60/org.project60.banking/releases/download/0.8.3/org.project60.banking-0.8.3.zip
download_ext assignee https://lab.civicrm.org/extensions/assignee/-/archive/1.4/assignee-1.4.zip
@ -83,7 +74,6 @@ download_ext form-processor https://lab.civicrm.org/extensions/form-processor/-/
download_ext de.systopia.xcm https://github.com/systopia/de.systopia.xcm/releases/download/1.8/de.systopia.xcm-1.8.zip
download_ext group2summary https://lab.civicrm.org/extensions/group2summary/-/archive/1.6/group2summary-1.6.zip
download_ext org.project60.bic https://github.com/Project60/org.project60.bic/releases/download/1.8.0/org.project60.bic-1.8.0.zip
download_ext org.project60.sepa https://github.com/Project60/org.project60.sepa/archive/refs/tags/1.9.1.zip
download_ext org.civicrm.contactlayout https://github.com/civicrm/org.civicrm.contactlayout/archive/2.2.1.zip
download_ext org.civicrm.recentmenu https://github.com/civicrm/org.civicrm.recentmenu/archive/1.5.zip
download_ext civirules https://lab.civicrm.org/extensions/civirules/-/archive/2.49/civirules-2.49.zip