Skip to content

Commit 2b93600

Browse files
arsenyinfopkosiec
andauthored
Pin apps init to appkit template-v0.11.0 by default (#4585)
## Changes Pin `apps init` default appkit version to `template-v0.11.0`. ## Tests Existing unit tests updated and passing. --------- Co-authored-by: Pawel Kosiec <pawel.kosiec@databricks.com>
1 parent c496214 commit 2b93600

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

cmd/apps/init.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const (
3333
appkitTemplateDir = "template"
3434
appkitDefaultBranch = "main"
3535
appkitTemplateTagPfx = "template-v"
36+
appkitDefaultVersion = "template-v0.11.0"
3637
defaultProfile = "DEFAULT"
3738
)
3839

@@ -161,7 +162,7 @@ Environment variables:
161162

162163
cmd.Flags().StringVar(&templatePath, "template", "", "Template path (local directory or GitHub URL)")
163164
cmd.Flags().StringVar(&branch, "branch", "", "Git branch or tag (for GitHub templates, mutually exclusive with --version)")
164-
cmd.Flags().StringVar(&version, "version", "", "AppKit version to use (default: latest release, use 'latest' for main branch)")
165+
cmd.Flags().StringVar(&version, "version", "", fmt.Sprintf("AppKit version to use (default: %s, use 'latest' for main branch)", appkitDefaultVersion))
165166
cmd.Flags().StringVar(&name, "name", "", "Project name (prompts if not provided)")
166167
cmd.Flags().StringVar(&warehouseID, "warehouse-id", "", "SQL warehouse ID")
167168
_ = cmd.Flags().MarkDeprecated("warehouse-id", "use --set <plugin>.sql-warehouse.id=<value> instead")
@@ -540,8 +541,8 @@ func runCreate(ctx context.Context, opts createOptions) error {
540541
case opts.version != "":
541542
gitRef = normalizeVersion(opts.version)
542543
default:
543-
// Default: use main branch
544-
gitRef = appkitDefaultBranch
544+
// Default: use pinned version
545+
gitRef = appkitDefaultVersion
545546
}
546547
templateSrc = appkitRepoURL
547548
}

cmd/apps/init_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ func TestNormalizeVersion(t *testing.T) {
211211
{"", ""},
212212
{"main", "main"},
213213
{"feat/something", "feat/something"},
214+
{appkitDefaultVersion, appkitDefaultVersion},
214215
}
215216

216217
for _, tt := range tests {

cmd/apps/manifest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func runManifestOnly(ctx context.Context, templatePath, branch, version string)
2626
case version != "":
2727
gitRef = normalizeVersion(version)
2828
default:
29-
gitRef = appkitDefaultBranch
29+
gitRef = appkitDefaultVersion
3030
}
3131
templateSrc = appkitRepoURL
3232
}

0 commit comments

Comments
 (0)