Skip to content

Commit d7588ca

Browse files
author
nejc
committed
Add support for all Laravel starter kits
- Add preset configurations for Vue, React, and Livewire starter kits - Add interactive setup command for easy configuration - Update README with comprehensive examples for each starter kit - Support custom repositories and private repos - Add auto-detection capabilities
1 parent 8ac4c12 commit d7588ca

File tree

4 files changed

+319
-8
lines changed

4 files changed

+319
-8
lines changed

README.md

Lines changed: 98 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![GitHub Stars](https://img.shields.io/github/stars/LaravelPlus/laravel-updater.svg?style=flat-square)](https://github.com/LaravelPlus/laravel-updater)
99
[![GitHub Issues](https://img.shields.io/github/issues/LaravelPlus/laravel-updater.svg?style=flat-square)](https://github.com/LaravelPlus/laravel-updater/issues)
1010

11-
A Laravel package for syncing with upstream repositories (GitHub, GitLab, Bitbucket, etc.) with comprehensive testing and hook support.
11+
A Laravel package for syncing with upstream repositories (GitHub, GitLab, Bitbucket, etc.) with comprehensive testing and hook support. Perfect for keeping your Laravel starter kit projects up to date!
1212

1313
## Features
1414

@@ -19,13 +19,37 @@ A Laravel package for syncing with upstream repositories (GitHub, GitLab, Bitbuc
1919
- 🛡️ **Safe operations** - Dry-run mode and comprehensive error handling
2020
- ⚙️ **Flexible configuration** - Environment variables and command-line overrides
2121
- 🚀 **Production ready** - Timeout protection and proper error handling
22+
- 🎯 **Starter Kit Support** - Pre-configured for all official Laravel starter kits
23+
- 🔧 **Easy Setup** - Interactive setup command for quick configuration
2224

2325
## Installation
2426

2527
```bash
2628
composer require laravelplus/laravel-updater
2729
```
2830

31+
## Quick Setup
32+
33+
### For Laravel Starter Kits
34+
35+
Use the interactive setup command for quick configuration:
36+
37+
```bash
38+
# Interactive setup
39+
php artisan upstream:setup
40+
41+
# Or specify your starter kit directly
42+
php artisan upstream:setup --preset=vue
43+
php artisan upstream:setup --preset=react
44+
php artisan upstream:setup --preset=livewire
45+
```
46+
47+
### For Custom Repositories
48+
49+
```bash
50+
php artisan upstream:setup --preset=custom --url=https://github.com/your-org/your-repo.git
51+
```
52+
2953
## Configuration
3054

3155
Publish the configuration file:
@@ -78,48 +102,114 @@ GIT_BINARY=git
78102

79103
## Usage
80104

81-
### Basic Sync
105+
### Quick Start Examples
106+
107+
#### Vue Starter Kit
108+
```bash
109+
# Setup for Vue starter kit
110+
php artisan upstream:setup --preset=vue
111+
112+
# Test and sync
113+
php artisan upstream:sync --test
114+
```
115+
116+
#### React Starter Kit
117+
```bash
118+
# Setup for React starter kit
119+
php artisan upstream:setup --preset=react
120+
121+
# Test and sync
122+
php artisan upstream:sync --test
123+
```
124+
125+
#### Livewire Starter Kit
126+
```bash
127+
# Setup for Livewire starter kit
128+
php artisan upstream:setup --preset=livewire
129+
130+
# Test and sync
131+
php artisan upstream:sync --test
132+
```
133+
134+
#### Custom Repository
135+
```bash
136+
# Setup for custom repository
137+
php artisan upstream:setup --preset=custom --url=https://github.com/your-org/your-repo.git
138+
139+
# Test and sync
140+
php artisan upstream:sync --test
141+
```
142+
143+
### Advanced Usage
144+
145+
#### Basic Sync
82146

83147
```bash
84148
php artisan upstream:sync
85149
```
86150

87-
### Test Before Sync
151+
#### Test Before Sync
88152

89153
```bash
90154
php artisan upstream:sync --test
91155
```
92156

93-
### Dry Run (See What Would Happen)
157+
#### Dry Run (See What Would Happen)
94158

95159
```bash
96160
php artisan upstream:sync --dry-run
97161
```
98162

99-
### Use Rebase Strategy
163+
#### Use Rebase Strategy
100164

101165
```bash
102166
php artisan upstream:sync --strategy=rebase
103167
```
104168

105-
### Override Upstream URL
169+
#### Override Upstream URL
106170

107171
```bash
108172
php artisan upstream:sync --upstream=https://github.com/other/repo.git
109173
```
110174

111-
### Skip Hooks
175+
#### Skip Hooks
112176

113177
```bash
114178
php artisan upstream:sync --no-pre --no-post
115179
```
116180

117-
### Custom Remote Name
181+
#### Custom Remote Name
118182

119183
```bash
120184
php artisan upstream:sync --remote-name=upstream
121185
```
122186

187+
## Supported Laravel Starter Kits
188+
189+
This package comes with pre-configured support for all official Laravel starter kits:
190+
191+
### Official Laravel Starter Kits
192+
193+
- **Vue Starter Kit** - [laravel/vue-starter-kit](https://github.com/laravel/vue-starter-kit)
194+
- Vue 3 + Inertia.js + TypeScript + Tailwind CSS
195+
- Perfect for modern SPA applications
196+
197+
- **React Starter Kit** - [laravel/react-starter-kit](https://github.com/laravel/react-starter-kit)
198+
- React 19 + Inertia.js + TypeScript + Tailwind CSS
199+
- Ideal for React-based applications
200+
201+
- **Livewire Starter Kit** - [laravel/livewire-starter-kit](https://github.com/laravel/livewire-starter-kit)
202+
- Livewire 3 + Laravel Volt + TypeScript + Tailwind CSS
203+
- Great for teams preferring PHP over JavaScript
204+
205+
### Custom Starter Kits
206+
207+
The package also supports any custom Laravel starter kit or repository:
208+
209+
- **Custom Repositories** - Any Git repository URL
210+
- **Private Repositories** - GitHub, GitLab, Bitbucket private repos
211+
- **Self-hosted Git** - Your own Git server
212+
123213
## Supported Platforms
124214

125215
This package works with any Git-based repository hosting service:

src/Config/upstream.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
|--------------------------------------------------------------------------
99
| Upstream Repository Settings
1010
|--------------------------------------------------------------------------
11+
|
12+
| Configure your upstream repository settings. The package supports
13+
| all Laravel starter kits and custom repositories.
14+
|
15+
| Official Laravel Starter Kits:
16+
| - Vue: https://github.com/laravel/vue-starter-kit.git
17+
| - React: https://github.com/laravel/react-starter-kit.git
18+
| - Livewire: https://github.com/laravel/livewire-starter-kit.git
19+
|
1120
*/
1221
'upstream_url' => env('UPSTREAM_URL', 'https://github.com/laravel/vue-starter-kit.git'),
1322
'upstream_branch' => env('UPSTREAM_BRANCH', 'main'),
@@ -47,4 +56,57 @@
4756
// 'php artisan migrate --force',
4857
// 'php artisan up',
4958
],
59+
60+
/*
61+
|--------------------------------------------------------------------------
62+
| Starter Kit Presets
63+
|--------------------------------------------------------------------------
64+
|
65+
| Pre-configured settings for official Laravel starter kits.
66+
| Use these presets by setting UPSTREAM_PRESET in your .env file.
67+
|
68+
*/
69+
'presets' => [
70+
'vue' => [
71+
'upstream_url' => 'https://github.com/laravel/vue-starter-kit.git',
72+
'upstream_branch' => 'main',
73+
'post_update' => [
74+
'composer install --no-interaction --prefer-dist --optimize-autoloader',
75+
'npm ci',
76+
'npm run build',
77+
'php artisan migrate --force',
78+
],
79+
],
80+
'react' => [
81+
'upstream_url' => 'https://github.com/laravel/react-starter-kit.git',
82+
'upstream_branch' => 'main',
83+
'post_update' => [
84+
'composer install --no-interaction --prefer-dist --optimize-autoloader',
85+
'npm ci',
86+
'npm run build',
87+
'php artisan migrate --force',
88+
],
89+
],
90+
'livewire' => [
91+
'upstream_url' => 'https://github.com/laravel/livewire-starter-kit.git',
92+
'upstream_branch' => 'main',
93+
'post_update' => [
94+
'composer install --no-interaction --prefer-dist --optimize-autoloader',
95+
'npm ci',
96+
'npm run build',
97+
'php artisan migrate --force',
98+
],
99+
],
100+
],
101+
102+
/*
103+
|--------------------------------------------------------------------------
104+
| Auto-detect Starter Kit
105+
|--------------------------------------------------------------------------
106+
|
107+
| Automatically detect which starter kit you're using based on
108+
| package.json dependencies and set appropriate defaults.
109+
|
110+
*/
111+
'auto_detect' => env('UPSTREAM_AUTO_DETECT', true),
50112
];

0 commit comments

Comments
 (0)