Skip to content
Open
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
7 changes: 4 additions & 3 deletions cmd/apps/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
appkitTemplateDir = "template"
appkitDefaultBranch = "main"
appkitTemplateTagPfx = "template-v"
appkitDefaultVersion = "template-v0.11.0"
defaultProfile = "DEFAULT"
)

Expand Down Expand Up @@ -161,7 +162,7 @@ Environment variables:

cmd.Flags().StringVar(&templatePath, "template", "", "Template path (local directory or GitHub URL)")
cmd.Flags().StringVar(&branch, "branch", "", "Git branch or tag (for GitHub templates, mutually exclusive with --version)")
cmd.Flags().StringVar(&version, "version", "", "AppKit version to use (default: latest release, use 'latest' for main branch)")
cmd.Flags().StringVar(&version, "version", "", fmt.Sprintf("AppKit version to use (default: %s, use 'latest' for main branch)", appkitDefaultVersion))
cmd.Flags().StringVar(&name, "name", "", "Project name (prompts if not provided)")
cmd.Flags().StringVar(&warehouseID, "warehouse-id", "", "SQL warehouse ID")
_ = cmd.Flags().MarkDeprecated("warehouse-id", "use --set <plugin>.sql-warehouse.id=<value> instead")
Expand Down Expand Up @@ -540,8 +541,8 @@ func runCreate(ctx context.Context, opts createOptions) error {
case opts.version != "":
gitRef = normalizeVersion(opts.version)
default:
// Default: use main branch
gitRef = appkitDefaultBranch
// Default: use pinned version
gitRef = appkitDefaultVersion
}
templateSrc = appkitRepoURL
}
Expand Down
1 change: 1 addition & 0 deletions cmd/apps/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func TestNormalizeVersion(t *testing.T) {
{"", ""},
{"main", "main"},
{"feat/something", "feat/something"},
{appkitDefaultVersion, appkitDefaultVersion},
}

for _, tt := range tests {
Expand Down
2 changes: 1 addition & 1 deletion cmd/apps/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func runManifestOnly(ctx context.Context, templatePath, branch, version string)
case version != "":
gitRef = normalizeVersion(version)
default:
gitRef = appkitDefaultBranch
gitRef = appkitDefaultVersion
}
templateSrc = appkitRepoURL
}
Expand Down