Skip to content

Commit

Permalink
Merge pull request #645 from humanmade/remove-manual-install
Browse files Browse the repository at this point in the history
Remove manual install
  • Loading branch information
joehoyle authored Jun 24, 2024
2 parents fb08aba + 97ab3a4 commit 6c80d59
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 51 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/build-release.yml

This file was deleted.

10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It's focused on providing a highly robust S3 interface with no "bells and whistl

## Getting Set Up

### Install Using Composer
S3 Uploads requires installation via Composer:

```
composer require humanmade/s3-uploads
Expand All @@ -49,13 +49,7 @@ composer require humanmade/s3-uploads
require_once __DIR__ . '/vendor/autoload.php';
```

### Install Manually

If you do not use Composer to manage plugins or other dependencies, you can install the plugin manually. Download the `manual-install.zip` file from the [Releases page](https://github.com/humanmade/S3-Uploads/releases) and extract the ZIP file to your `plugins` directory.

You can also `git clone` this repository, and run `composer install` in the plugin folder to pull in its dependencies.

---
## Configuration

Once you've installed the plugin, add the following constants to your `wp-config.php`:

Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
},
"authors": [
{
"name":"Human Made Limited",
"email":"[email protected]",
"homepage":"http://hmn.md/"
"name": "Human Made",
"homepage": "https://humanmade.com/"
}
],
"support": {
Expand Down
4 changes: 2 additions & 2 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
function init() {
// Ensure the AWS SDK can be loaded.
if ( ! class_exists( '\\Aws\\S3\\S3Client' ) ) {
// Require AWS Autoloader file.
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
trigger_error( 'S3 Uploads requires the AWS SDK. Ensure Composer dependencies have been loaded.', E_USER_WARNING );
return;
}

if ( ! check_requirements() ) {
Expand Down
5 changes: 4 additions & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
require '/wp-phpunit/includes/functions.php';

function _manually_load_plugin() {
require dirname( __FILE__ ) . '/../s3-uploads.php';
if ( file_exists( dirname( __DIR__ ) . '/vendor/autoload.php' ) ) {
require dirname( __DIR__ ) . '/vendor/autoload.php';
}
require dirname( __DIR__ ) . '/s3-uploads.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );

Expand Down

0 comments on commit 6c80d59

Please sign in to comment.