mirror of
https://github.com/silicoflare/envy.git
synced 2026-05-26 19:57:59 +05:30
feat: change project config file name to envy.toml
This commit is contained in:
@@ -22,7 +22,7 @@ var createCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
|
||||
_, err = os.Stat(path.Join(cwd, ".envy"))
|
||||
_, err = os.Stat(path.Join(cwd, "envy.toml"))
|
||||
|
||||
// file exists, create environment
|
||||
if err == nil {
|
||||
@@ -34,7 +34,7 @@ var createCmd = &cobra.Command{
|
||||
|
||||
project := envy.Get("envy.project").(string)
|
||||
if project == "" {
|
||||
utils.ErrPrint("Project name is empty. .envy file might have been modified.")
|
||||
utils.ErrPrint("Project name is empty. envy.toml file might have been modified.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -125,11 +125,11 @@ var createCmd = &cobra.Command{
|
||||
env := utils.Environment{Name: environment, ProjectID: proj.ID, Data: utils.ParseEnv(string(envFile))}
|
||||
utils.DB.Create(&env)
|
||||
|
||||
filePath := path.Join(cwd, ".envy")
|
||||
filePath := path.Join(cwd, "envy.toml")
|
||||
|
||||
err = os.WriteFile(filePath, []byte(fmt.Sprintf("[envy]\nproject = \"%s\"\nenv = \"%s\"\n", project, environment)), 0644)
|
||||
if err != nil {
|
||||
log.Println("Error creating .envy file:", err)
|
||||
log.Println("Error creating envy.toml file:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user