Skip to content

Commit 2bcad18

Browse files
committed
fix: use temp_internal as temp upgrade directory
1 parent 7a85ea6 commit 2bcad18

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

config/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Thumbs.db
2929
# Release outputs
3030
temp_external/
3131

32+
# Internal upgrade directory
33+
temp_internal/
34+
3235
# DevKit context configurations (only devnet.yaml is indexed)
3336
config/contexts/**/*
3437
!config/contexts/devnet.yaml

pkg/commands/template/upgrade.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ func createUpgradeCommand(
157157
return fmt.Errorf("uncommitted changes found, please commit or stash them before upgrading")
158158
}
159159

160-
// Ensure .gitignore entry is present for tempExternal
161-
tempExternal := "temp_external"
162-
if err := gitClient.EnsureGitignoreEntry(".gitignore", tempExternal); err != nil {
163-
return fmt.Errorf("failed to add entry to .gitignore %s: %w", tempExternal, err)
160+
// Ensure .gitignore entry is present for tempInternal
161+
tempInternal := "temp_internal"
162+
if err := gitClient.EnsureGitignoreEntry(".gitignore", fmt.Sprintf("%s/", tempInternal)); err != nil {
163+
return fmt.Errorf("failed to add entry to .gitignore %s: %w", tempInternal, err)
164164
}
165165

166166
// Ensure parent exists
167-
tempParent := filepath.Join(absProjectPath, tempExternal)
167+
tempParent := filepath.Join(absProjectPath, tempInternal)
168168
if err := os.MkdirAll(tempParent, 0o755); err != nil {
169169
return fmt.Errorf("failed to create %s: %w", tempParent, err)
170170
}

0 commit comments

Comments
 (0)