Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kshaner committed Apr 9, 2021
1 parent fcae7e8 commit 513b735
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
"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"
],
"psr-4": {
"WDG\\SupportMonitor\\": "src/"
}
},
"scripts": {
"release": "WDG\\SupportMonitor\\Scripts::release"
}
}
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: WDG Support Monitor
* Version: 1.0.0
* Version: 1.0.1
* Description: Monitors site status for support.
* Author: WDG - The Web Development Group
* Author URI: https://www.webdevelopmentgroup.com
Expand Down
17 changes: 17 additions & 0 deletions src/Scripts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace WDG\SupportMonitor;

class Scripts {
public static function release( $event ) {
try {
$fileName = "wdg-support-monitor-wordpress-{$event->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() );
}
}
}

0 comments on commit 513b735

Please sign in to comment.