miya/gh-auto-updater 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

miya/gh-auto-updater

Composer 安装命令:

composer require miya/gh-auto-updater

包简介

README 文档

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

A composer library for self-hosted WordPress plugin on GitHub with automatic update.

Getting Started

1. The easier way to install this is by using composer.

$ composer require miya/gh-auto-updater

2. Activate automatic update in your WordPress plugin.

<?php

// Autoload
require_once( dirname( __FILE__ ) . '/vendor/autoload.php' );

add_action( 'init', 'activate_autoupdate' );

function activate_autoupdate() {
	$plugin_slug = plugin_basename( __FILE__ ); // e.g. `hello/hello.php`.
	$gh_user = 'miya0001';                      // The user name of GitHub.
	$gh_repo = 'gh-auto-updater-example';       // The repository name of your plugin.

	// Activate automatic update.
	new Miya\WP\GH_Auto_Updater( $plugin_slug, $gh_user, $gh_repo );
}

3. GitHub Access Token (Optional)

You can use personal access token.

define( 'GITHUB_ACCESS_TOKEN', 'xxxxxxxx' );

How to update your plugin.

To release the new version, please do as follows:

1. Tag and push to GitHub.

$ git tag 1.1.0
$ git push origin 1.1.0
  • 1.0.0 is a version number, it have to be same with version number in your WordPress plugin.
  • You have to commit vendor directory in your plugin.

2. Release the new version.

  1. Please visit "releases" in your GitHub repository.
  2. Choose a tag.
  3. Fill out the release note and title.
  4. Upload your plugin which is comporessed with zip. (Optional)
  5. Press "Publish release".

Also, you can use automatic release.

Following is an example of the .travis.yml for automatic release.

https://github.com/miya0001/miya-gallery/blob/master/.travis.yml

You can generate deploy: section by The Travis Client like following.

$ travis setup releases

Example Projects

Please install old version of following projects, then you can see update notice.

These projects deploy new releases automatically with Travis CI.

$ travis setup releases

Please check .travis.yml and documentation.

Screenshots

Notification on "Plugins" screen in WordPress dashboard.

"Details" screen in WordPress dashboard. You can see release note on GitHub as changelog.

"WordPress Updates" screen.

License

GPL v2

统计信息

  • 总下载量: 1.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 44
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 44
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL
  • 更新时间: 2017-02-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固