diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a7e8081 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.zip +*.gz \ No newline at end of file diff --git a/src/Controller/OperatorStatusController.php b/Controller/OperatorStatusController.php similarity index 100% rename from src/Controller/OperatorStatusController.php rename to Controller/OperatorStatusController.php diff --git a/src/Plugin.php b/Plugin.php similarity index 100% rename from src/Plugin.php rename to Plugin.php diff --git a/README.md b/README.md index 63cd6bb..51af121 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,7 @@ is online or `false` when operator is offline. # Install -1. Get the archive with the plugin sources from link bellow: - - * [mibew-operator-status-plugin.tar.gz](archive/mibew-operator-status-plugin.tar.gz) - - * [mibew-operator-status-plugin.zip](archive/mibew-operator-status-plugin.zip) +1. Get the archive with the plugin sources from [release page](https://github.com/everyx/mibew-operator-status-plugin/releases): 2. Untar/unzip the plugin's archive. diff --git a/archive/mibew-operator-status-plugin.tar.gz b/archive/mibew-operator-status-plugin.tar.gz deleted file mode 100644 index 7ff706d..0000000 Binary files a/archive/mibew-operator-status-plugin.tar.gz and /dev/null differ diff --git a/archive/mibew-operator-status-plugin.zip b/archive/mibew-operator-status-plugin.zip deleted file mode 100644 index 3bd29c7..0000000 Binary files a/archive/mibew-operator-status-plugin.zip and /dev/null differ diff --git a/build.sh b/build.sh index 189a850..4a24ef8 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,22 @@ #!/bin/bash -plugin_root_dir='Everyx' -plugin_target_dir="$plugin_root_dir/Mibew/Plugin/OperatorStatus" -mkdir -p $plugin_target_dir -cp -R src/* $plugin_target_dir -tar -czvf archive/mibew-operator-status-plugin.tar.gz $plugin_root_dir -zip -r archive/mibew-operator-status-plugin.zip $plugin_root_dir +author='Everyx' + +tmp_dir='/tmp' +working_dir=`echo $PWD` + +target_dir="$tmp_dir/$author/Mibew/Plugin/OperatorStatus" +mkdir -p $target_dir + +shopt -s extglob +cp -R !(*.sh) $target_dir +shopt -u extglob + +version=`cat Plugin.php|grep -Po "(?<=return ')(\d.){2}\d{1}"` + +cd $tmp_dir + +tar -czvf $working_dir/mibew-operator-status-plugin.$version.tar.gz $author +zip -r $working_dir/mibew-operator-status-plugin.$version.zip $author + rm -rf $plugin_root_dir diff --git a/src/composer.json b/composer.json similarity index 100% rename from src/composer.json rename to composer.json diff --git a/src/routing.yml b/routing.yml similarity index 84% rename from src/routing.yml rename to routing.yml index 11cea93..144cd09 100644 --- a/src/routing.yml +++ b/routing.yml @@ -1,4 +1,4 @@ -mibew_boilerplate_hello: +everyx_operator_status: path: /opstatus/{opcode} defaults: _controller: Everyx\Mibew\Plugin\OperatorStatus\Controller\OperatorStatusController::indexAction