Skip to content

Commit 954dfa2

Browse files
committed
Use branch
1 parent 483f52b commit 954dfa2

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function update(UpdaterManager $updater)
168168
// .. and shorthand for this:
169169
$updater->source()->update;
170170

171-
$updater->fetch() // Same as above...
171+
$updater->fetch(); // Same as above...
172172
}
173173
```
174174

@@ -183,6 +183,28 @@ of your software.
183183
Just make sure you set the proper repository in your `config/self-updater.php`
184184
file.
185185

186+
#### Tag-based updates
187+
188+
This is the default. Updates will be fetched by using a tagged commit, aka release.
189+
190+
#### Branch-based updates
191+
192+
Select the branch that should be used via the `use_branch` setting [inside the configuration](https://github.com/codedge/laravel-selfupdater/blob/master/config/self-update.php).
193+
194+
```php
195+
// ...
196+
'repository_types' => [
197+
'github' => [
198+
'type' => 'github',
199+
'repository_vendor' => env('SELF_UPDATER_REPO_VENDOR', ''),
200+
'repository_name' => env('SELF_UPDATER_REPO_NAME', ''),
201+
// ...
202+
'use_branch' => 'v2',
203+
],
204+
// ...
205+
];
206+
```
207+
186208
### Using Http archives
187209
The package comes with an _Http_ source repository type to fetch
188210
releases from an HTTP directory listing containing zip archives.

0 commit comments

Comments
 (0)