diff --git a/.travis.yml b/.travis.yml index ec9429e..19c16cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,65 +1,48 @@ sudo: false dist: trusty - language: php - notifications: email: on_success: never on_failure: change - branches: only: - - master - + - master + - "/^v?[0-9\\.]+$/" cache: directories: - - $HOME/.composer/cache - -matrix: - include: - - php: 7.2 - env: WP_VERSION=latest - - php: 7.1 - env: WP_VERSION=latest - - php: 7.0 - env: WP_VERSION=latest - - php: 5.6 - env: WP_VERSION=latest - - php: 5.6 - env: WP_VERSION=trunk - - php: 5.6 - env: WP_TRAVISCI=phpcs - - php: 5.3 - env: WP_VERSION=latest - dist: precise - + - "$HOME/.composer/cache" +php: +- 5.6 +- 7.0 +env: +- WP_VERSION=latest WP_MULTISITE=0 +- WP_VERSION=4.9 WP_MULTISITE=0 +- WP_VERSION=5.0 WP_MULTISITE=0 before_script: - - export PATH="$HOME/.composer/vendor/bin:$PATH" - - | - if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then - phpenv config-rm xdebug.ini - else - echo "xdebug.ini does not exist" - fi - - | - if [[ ! -z "$WP_VERSION" ]] ; then - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION - composer global require "phpunit/phpunit=4.8.*|5.7.*" - fi - - | - if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then - composer global require wp-coding-standards/wpcs - phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs - fi - +- composer install +- curl -s -o $HOME/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/v0.31.0/nvm.sh +- source $HOME/.nvm/nvm.sh +- nvm install v10.13.0 +- node --version +- npm install && npm run package +- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION script: - - | - if [[ ! -z "$WP_VERSION" ]] ; then - phpunit - WP_MULTISITE=1 phpunit - fi - - | - if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then - phpcs - fi +- composer test +before_deploy: + - composer install --no-dev + - rm -rf .git + - "curl -L https://raw.githubusercontent.com/fumikito/wp-readme/master/wp-readme.php | php" + - rm -rf {tests,assets,bin,node_modules,.git,phpunit.xml.dist,.gitignore,.travis.yml,phpunit.xml.dist,README.md,composer.lock,package-lock.json,.phpcs.xml.dist.travis.yml} + - sed -i -e "s/nightly/${TRAVIS_TAG}/" readme.txt + - sed -i -e "s/nightly/${TRAVIS_TAG}/" $(basename $TRAVIS_REPO_SLUG).php + - zip -r hiden-$TRAVIS_TAG.zip ./ +deploy: + provider: releases + api_key: + secure: hwK3iqs89CvYAxWmp88379PG53mIvG7RS3kKKBQ9LrSPqCOi5nOMk3S9HYj14dqCFpu1nbYnXC4v1AzIoNWbYKkUQuCbYgAOYsYHB5BxiDNl2u2RtQRjA6is5rSXK5U3gagT3/yFcM0+vdJuFjMwSjwPsoEEi+wcCT31SANM1HA2Ypbvp3zVP1KzootE0pKmNBmwJQFHQ1/I56ObR72M5m0VwGriUVx7/FJU7CTUh/R00AeGsWGBSlXS8srPeVpI41JS48GmNkS+fGrteOyckiho38o8EkZg8oH0D+OpHRI8QqX0Ckj3cVUj3EOED8narFyAoCKHiH/+R1Tl2EwLzM7DSCHOEuf36+bZSP4eCARmodFWeoyP5rtO3/Yox8QtOQ8PHIfoMLGcOa4pVX4jYmnRDB0xfRvgKO+WXXKpqNfxCrYT361IL4Q4uqoYBIl2MYw9atuuXZU7ssdm7adz7ewnGfB6kn+nH1k8kWuDG9FWXicZ9YAcLhnW8b9Ciuv1P0mIThCpBIJSK2k0L0yzD2XtDV0uS+mMxNhLo9sPJWhIqJ50qyCZgQmxlbED9KFSXcq1z5CBgz2qm92idBnJwTa8KsQGpPAxvrsdn1gKtDDOJXpMaveOcTBBC5fxWO2c08emOVT1sRBw2Wu9PZKGBE2JWO0UXL5EWJwJHTZg+6A= + file: hiden-$TRAVIS_TAG.zip + skip_cleanup: true + on: + repo: kuno1/hiden + tags: true diff --git a/README.md b/README.md index 90684db..969eeb9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ -# hiden -A repository manager for kunoiciwp.com +# Hiden + +Contributors: kunoichi,Takahashi_Fumiki +Donate link: https://kunoichiwp.com/product/plugin/hiden +Tags: plugin, theme, updater +Requires at least: 4.9 +Tested up to: 5.2.1 +Stable tag: nightly +License: GPLv3 or later +License URI: https://www.gnu.org/licenses/gpl-3.0.html + +A auto updater for [Kunoichi WP Marketplace(kunoiciwp.com). + +## Description + +This plugin integrates WordPress updater with [Kunoichi WP Marketplace](https://kunoichiwp.com). + +Just install and activate, your can update all of our products. + +### Current Status + +* Plugin updater + +## Installation + +1. Download this plugin's zip file `hiden-x.x.x.zip`. +2. Go to WordPress admin screen "Plugins > Add New". You will find upload button just after title text. +3. Click the button and open an uploader, then upload zip file. +4. After finishing install, activate it. + +After activation, API key is required. You can get one at [Kunoichi my account](https://kunoichiwp.com/my-account/license/). + +If the license is valid, you can update plugins and themes. + +## Supports + +Please visit our [support forum](https://kunoichiwp.com/product/plugin/hiden). \ No newline at end of file diff --git a/composer.json b/composer.json index 4c60eec..5c944bb 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,9 @@ ], "minimum-stability": "stable", "require": {}, + "scripts": { + "test": "phpunit" + }, "require-dev": { "phpunit/phpunit": "^6" }, diff --git a/hiden.php b/hiden.php index 7ae3704..e996806 100644 --- a/hiden.php +++ b/hiden.php @@ -1,10 +1,10 @@ ", "license": "GPL-3.0-or-later", "bugs": { - "url": "" + "url": "https://github.com/kuno1/hiden/issues" }, "homepage": "https://kunoichiwp.com", "devDependencies": { diff --git a/tests/test-plugins.php b/tests/test-plugins.php new file mode 100644 index 0000000..f5ce455 --- /dev/null +++ b/tests/test-plugins.php @@ -0,0 +1,28 @@ +assertInstanceOf( 'WP_Error', $this->plugins->get_plugin_list( [] ) ); + } + + function __get( $name ) { + switch ( $name ) { + case 'plugins': + return \Kunoichi\Hiden\API\Plugins::get_instance(); + default: + return parent::__get( $name ); // TODO: Change the autogenerated stub + } + } + + +} diff --git a/tests/test-sample.php b/tests/test-utilities.php similarity index 59% rename from tests/test-sample.php rename to tests/test-utilities.php index c7d662f..ed8982c 100644 --- a/tests/test-sample.php +++ b/tests/test-utilities.php @@ -1,14 +1,10 @@