Commit e3ff831f authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Install 3rd party MU plugins via composer

parent 900dc439
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -8,7 +8,8 @@
		}
	],
	"require": {
		"humanmade/s3-uploads": "dev-develop"
		"humanmade/s3-uploads": "dev-develop",
		"ayesh/wordpress-password-hash": "2.*"
	},
	"config": {
		"gitlab-domains": [ "code.kodo.org.uk" ]
@@ -17,5 +18,10 @@
		"installer-paths": {
			"wp-content/mu-plugins/{$name}/": [ "type:wordpress-plugin" ]
		}
	},
	"scripts": {
		"post-update-cmd": [
			"cd */mu-plugins;for f in */*.php;do [ `basename $f` != index.php ] && ln -s $f `dirname $f`.php; done"
		]
	}
}
+0 −2
Original line number Diff line number Diff line
@@ -89,8 +89,6 @@ add_filter(
	}
);

require WPMU_PLUGIN_DIR . '/s3-uploads/s3-uploads.php';

endif;


+6 −5
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2019-2021 Dominik Sekotill <dom.sekotill@kodo.org.uk>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

set -eux

COMPOSER_INSTALLER_URL=https://getcomposer.org/installer
WP_CLI_URL=https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
WP_PASSWORD_HASH=https://raw.githubusercontent.com/Ayesh/WordPress-Password-Hash/1.5.1

# Install Composer
curl -sSL ${COMPOSER_INSTALLER_URL} |
@@ -24,10 +29,6 @@ rm wp-config-sample.php
mkdir --mode=go+w media
mkdir -p wp-content/mu-plugins

# Install non-optional plugins
curl ${WP_PASSWORD_HASH}/wp-php-password-hash.php \
	>wp-content/mu-plugins/password-hash.php

# Install composer managed dependencies
export COMPOSER_ALLOW_SUPERUSER=1
composer install --prefer-dist