Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add template_url param to bootstrap #2120

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,11 @@ components:
kps_enabled:
type: boolean
deprecated: true
template_url:
template_url:
type: string
description: Template URL used to create the project from the CLI.
example: https://github.com/supabase/supabase/tree/master/examples/slack-clone/nextjs-slack-clone
required:
- db_pass
- name
Expand Down
5 changes: 4 additions & 1 deletion internal/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func Run(ctx context.Context, templateUrl string, fsys afero.Fs, options ...func
return err
}
// 2. Create project
params := api.CreateProjectBody{Name: filepath.Base(workdir)}
params := api.CreateProjectBody{
Name: filepath.Base(workdir),
TemplateUrl: &templateUrl,
}
if err := create.Run(ctx, params, fsys); err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/api/types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.