Skip to content

Commit

Permalink
fix: rename the override file to edge-runtime-version
Browse files Browse the repository at this point in the history
  • Loading branch information
laktek committed Feb 24, 2025
1 parent 997f3b0 commit d005d6c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func (c *config) Load(path string, fsys fs.FS) error {
c.Auth.Image = replaceImageTag(Images.Gotrue, string(version))
}
}
if version, err := fs.ReadFile(fsys, builder.FunctionVersionPath); err == nil && len(version) > 0 {
if version, err := fs.ReadFile(fsys, builder.EdgeRuntimeVersionPath); err == nil && len(version) > 0 {
c.EdgeRuntime.Image = replaceImageTag(Images.EdgeRuntime, string(version))
}
if version, err := fs.ReadFile(fsys, builder.PoolerVersionPath); err == nil && len(version) > 0 {
Expand Down
100 changes: 50 additions & 50 deletions pkg/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ import (
)

type pathBuilder struct {
SupabaseDirPath string
ConfigPath string
GitIgnorePath string
TempDir string
ImportMapsDir string
ProjectRefPath string
PoolerUrlPath string
PostgresVersionPath string
GotrueVersionPath string
RestVersionPath string
StorageVersionPath string
StudioVersionPath string
PgmetaVersionPath string
PoolerVersionPath string
RealtimeVersionPath string
FunctionVersionPath string
CliVersionPath string
CurrBranchPath string
SchemasDir string
MigrationsDir string
FunctionsDir string
FallbackImportMapPath string
FallbackEnvFilePath string
DbTestsDir string
CustomRolesPath string
SupabaseDirPath string
ConfigPath string
GitIgnorePath string
TempDir string
ImportMapsDir string
ProjectRefPath string
PoolerUrlPath string
PostgresVersionPath string
GotrueVersionPath string
RestVersionPath string
StorageVersionPath string
StudioVersionPath string
PgmetaVersionPath string
PoolerVersionPath string
RealtimeVersionPath string
EdgeRuntimeVersionPath string
CliVersionPath string
CurrBranchPath string
SchemasDir string
MigrationsDir string
FunctionsDir string
FallbackImportMapPath string
FallbackEnvFilePath string
DbTestsDir string
CustomRolesPath string
}

func NewPathBuilder(configPath string) pathBuilder {
Expand All @@ -44,31 +44,31 @@ func NewPathBuilder(configPath string) pathBuilder {
// TODO: make base path configurable from toml
base := filepath.Dir(configPath)
return pathBuilder{
SupabaseDirPath: base,
ConfigPath: configPath,
GitIgnorePath: filepath.Join(base, ".gitignore"),
TempDir: filepath.Join(base, ".temp"),
ImportMapsDir: filepath.Join(base, ".temp", "import_maps"),
ProjectRefPath: filepath.Join(base, ".temp", "project-ref"),
PoolerUrlPath: filepath.Join(base, ".temp", "pooler-url"),
PostgresVersionPath: filepath.Join(base, ".temp", "postgres-version"),
GotrueVersionPath: filepath.Join(base, ".temp", "gotrue-version"),
RestVersionPath: filepath.Join(base, ".temp", "rest-version"),
StorageVersionPath: filepath.Join(base, ".temp", "storage-version"),
FunctionVersionPath: filepath.Join(base, ".temp", "function-version"),
StudioVersionPath: filepath.Join(base, ".temp", "studio-version"),
PgmetaVersionPath: filepath.Join(base, ".temp", "pgmeta-version"),
PoolerVersionPath: filepath.Join(base, ".temp", "pooler-version"),
RealtimeVersionPath: filepath.Join(base, ".temp", "realtime-version"),
CliVersionPath: filepath.Join(base, ".temp", "cli-latest"),
CurrBranchPath: filepath.Join(base, ".branches", "_current_branch"),
SchemasDir: filepath.Join(base, "schemas"),
MigrationsDir: filepath.Join(base, "migrations"),
FunctionsDir: filepath.Join(base, "functions"),
FallbackImportMapPath: filepath.Join(base, "functions", "import_map.json"),
FallbackEnvFilePath: filepath.Join(base, "functions", ".env"),
DbTestsDir: filepath.Join(base, "tests"),
CustomRolesPath: filepath.Join(base, "roles.sql"),
SupabaseDirPath: base,
ConfigPath: configPath,
GitIgnorePath: filepath.Join(base, ".gitignore"),
TempDir: filepath.Join(base, ".temp"),
ImportMapsDir: filepath.Join(base, ".temp", "import_maps"),
ProjectRefPath: filepath.Join(base, ".temp", "project-ref"),
PoolerUrlPath: filepath.Join(base, ".temp", "pooler-url"),
PostgresVersionPath: filepath.Join(base, ".temp", "postgres-version"),
GotrueVersionPath: filepath.Join(base, ".temp", "gotrue-version"),
RestVersionPath: filepath.Join(base, ".temp", "rest-version"),
StorageVersionPath: filepath.Join(base, ".temp", "storage-version"),
EdgeRuntimeVersionPath: filepath.Join(base, ".temp", "edge-runtime-version"),
StudioVersionPath: filepath.Join(base, ".temp", "studio-version"),
PgmetaVersionPath: filepath.Join(base, ".temp", "pgmeta-version"),
PoolerVersionPath: filepath.Join(base, ".temp", "pooler-version"),
RealtimeVersionPath: filepath.Join(base, ".temp", "realtime-version"),
CliVersionPath: filepath.Join(base, ".temp", "cli-latest"),
CurrBranchPath: filepath.Join(base, ".branches", "_current_branch"),
SchemasDir: filepath.Join(base, "schemas"),
MigrationsDir: filepath.Join(base, "migrations"),
FunctionsDir: filepath.Join(base, "functions"),
FallbackImportMapPath: filepath.Join(base, "functions", "import_map.json"),
FallbackEnvFilePath: filepath.Join(base, "functions", ".env"),
DbTestsDir: filepath.Join(base, "tests"),
CustomRolesPath: filepath.Join(base, "roles.sql"),
}
}

Expand Down

0 comments on commit d005d6c

Please sign in to comment.