Skip to content

Commit

Permalink
Update the docs to more clearly separate usage instructions for GitLa…
Browse files Browse the repository at this point in the history
…b.com and self-hosted GitLab instances.
  • Loading branch information
YahnisElsts committed Jan 4, 2019
1 parent 9d087b7 commit 57a25d9
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,23 @@ BitBucket doesn't have an equivalent to GitHub's releases, so the process is sli
'unique-plugin-or-theme-slug'
);

//Note: Self-hosted instances of GitLab must be initialized like this:
$myUpdateChecker = new Puc_v4p5_Vcs_PluginUpdateChecker(
new Puc_v4p5_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'),
__FILE__,
'unique-plugin-or-theme-slug'
);

//Optional: If you're using a private repository, specify the access token like this:
$myUpdateChecker->setAuthentication('your-token-here');

//Optional: Set the branch that contains the stable release.
$myUpdateChecker->setBranch('stable-branch-name');
```

Alternatively, if you're using a self-hosted GitLab instance, initialize the update checker like this:
```php
$myUpdateChecker = new Puc_v4p5_Vcs_PluginUpdateChecker(
new Puc_v4p5_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'),
__FILE__,
'unique-plugin-or-theme-slug'
);
//Optional: Add setAuthentication(...) and setBranch(...) as shown above.
```
3. Plugins only: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/about/readme.txt) to your repository. The contents of this file will be shown when the user clicks the "View version 1.2.3 details" link.
#### How to Release an Update
Expand Down

0 comments on commit 57a25d9

Please sign in to comment.