diff --git a/cmd/apps/init.go b/cmd/apps/init.go index 144b5b7c6d..b8afd64b05 100644 --- a/cmd/apps/init.go +++ b/cmd/apps/init.go @@ -33,6 +33,7 @@ const ( appkitTemplateDir = "template" appkitDefaultBranch = "main" appkitTemplateTagPfx = "template-v" + appkitDefaultVersion = "template-v0.11.0" defaultProfile = "DEFAULT" ) @@ -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 .sql-warehouse.id= instead") @@ -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 } diff --git a/cmd/apps/init_test.go b/cmd/apps/init_test.go index a96b984261..e7aff8c7bf 100644 --- a/cmd/apps/init_test.go +++ b/cmd/apps/init_test.go @@ -211,6 +211,7 @@ func TestNormalizeVersion(t *testing.T) { {"", ""}, {"main", "main"}, {"feat/something", "feat/something"}, + {appkitDefaultVersion, appkitDefaultVersion}, } for _, tt := range tests { diff --git a/cmd/apps/manifest.go b/cmd/apps/manifest.go index f4f5c0a4bb..f50185cc99 100644 --- a/cmd/apps/manifest.go +++ b/cmd/apps/manifest.go @@ -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 }