From 513b7359d041c0a84bf5b278eabcdb2741ad0c8c Mon Sep 17 00:00:00 2001 From: Kurtis Shaner Date: Fri, 9 Apr 2021 09:13:45 -0700 Subject: [PATCH] version 1.0.1 --- composer.json | 6 ++++-- index.php | 2 +- src/Scripts.php | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 src/Scripts.php diff --git a/composer.json b/composer.json index 9e8e38b..663906e 100644 --- a/composer.json +++ b/composer.json @@ -2,8 +2,7 @@ "name": "wdgdc/wdg-wp-support-monitor", "description": "A package to monitor WordPress status", "type": "library", - "license": "MIT", - "require": {}, + "version": "1.0.1", "autoload": { "files": [ "src/index.php" @@ -11,5 +10,8 @@ "psr-4": { "WDG\\SupportMonitor\\": "src/" } + }, + "scripts": { + "release": "WDG\\SupportMonitor\\Scripts::release" } } diff --git a/index.php b/index.php index 6753c72..19b75d4 100755 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ getComposer()->getPackage()->getVersion()}.zip"; + + exec( 'rm -rf ./vendor' ); + exec( 'composer install --no-dev --prefer-dist --optimize-autoloader' ); + exec( sprintf( 'zip -r %s src vendor composer.json index.php LICENSE README.md', $fileName ) ); + } catch ( \Throwable $e ) { + $event->getIO()->writeError( $e->getMessage() ); + } + } +} \ No newline at end of file