@@ -93,17 +93,10 @@ func (d *DryccCmd) BuildsFetch(appID string, version int, procfile, dryccpath, c
9393 return err
9494 }
9595 // Confirm again
96- dockerfile := "Dockerfile"
97- err = buildFetchConfirmAction (confirm , dockerfile , procfile , dryccpath , save )
96+ err = buildFetchConfirmAction (confirm , procfile , dryccpath , save )
9897 if err != nil {
9998 return err
10099 }
101- if len (build .Dockerfile ) != 0 {
102- err := writeDockerfileToPath (d , dockerfile , build .Dockerfile , save )
103- if err != nil {
104- return fmt .Errorf ("failed to write Dockerfile: %w" , err )
105- }
106- }
107100
108101 if len (build .Procfile ) != 0 {
109102 err := writeProcfileToPath (d , procfile , build .Procfile , save )
@@ -124,25 +117,13 @@ func (d *DryccCmd) BuildsFetch(appID string, version int, procfile, dryccpath, c
124117 return nil
125118}
126119
127- func writeDockerfileToPath (d * DryccCmd , dockerfile string , dockerinfo string , save bool ) error {
128- if save {
129- os .Remove (dockerfile )
130- err := os .WriteFile (dockerfile , []byte (dockerinfo ), 0664 )
131- return err
132- }
133- d .Println ("# Source:" , dockerfile )
134- d .Println (dockerinfo )
135- return nil
136-
137- }
138-
139120func writeProcfileToPath (d * DryccCmd , procfile string , Procinfo map [string ]string , save bool ) error {
140121 if save {
141122 os .Remove (procfile )
142123 err := os .WriteFile (procfile , []byte (d .toYamlString (Procinfo , 2 )), 0664 )
143124 return err
144125 }
145- d .Println ("# Source:" , procfile )
126+ d .Println ("--- \n # Source:" , procfile )
146127 d .Println (d .toYamlString (Procinfo , 2 ))
147128 return nil
148129}
@@ -180,7 +161,7 @@ func writeDryccfileToPath(d *DryccCmd, dryccpath string, dryccfile map[string]in
180161 return fmt .Errorf ("failed to write env file: %w" , err )
181162 }
182163 } else {
183- d .Println ("# Source:" , envFilePath )
164+ d .Println ("--- \n # Source:" , envFilePath )
184165 d .Println (content )
185166 }
186167 }
@@ -203,7 +184,7 @@ func writeDryccfileToPath(d *DryccCmd, dryccpath string, dryccfile map[string]in
203184 return fmt .Errorf ("failed to write pipeline file: %w" , err )
204185 }
205186 } else {
206- d .Println ("# Source:" , filePath )
187+ d .Println ("--- \n # Source:" , filePath )
207188 d .Println (string (yamlContent ))
208189 }
209190 }
@@ -238,13 +219,13 @@ func buildConfirmAction(c *drycc.Client, appID string, procfileMap map[string]st
238219 return nil
239220}
240221
241- func buildFetchConfirmAction (confirm , dockerfile , procfile , dryccpath string , save bool ) error {
222+ func buildFetchConfirmAction (confirm , procfile , dryccpath string , save bool ) error {
242223
243224 if save && (confirm == "" || confirm != "yes" ) {
244225 // hint
245226 msg := fmt .Sprintf (" ! WARNING: Potentially Build Fetch Action\n " +
246- " ! This operation will overwrite the current \x1b [1m%s\x1b [0m, \x1b [1m%s \x1b [0m or \x1b [1m%s\x1b [0m locally\n " +
247- " ! To proceed, type \" yes\" !\n \n > " , dockerfile , procfile , dryccpath )
227+ " ! This operation will overwrite the current \x1b [1m%s\x1b [0m or \x1b [1m%s\x1b [0m locally\n " +
228+ " ! To proceed, type \" yes\" !\n \n > " , procfile , dryccpath )
248229
249230 fmt .Print (msg )
250231 fmt .Scanln (& confirm )
0 commit comments