File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,18 @@ func (cmfInstance *cmf) CommitChanges() {
69
69
70
70
// CommitAmend perform a commit amend over current repository
71
71
func (cmfInstance * cmf ) CommitAmend () {
72
- fmt .Println ("amend!!" )
72
+ cmfInstance .repository .CheckWorkspaceChanges ()
73
+ currentDirectory , _ := cmfInstance .fs .GetCurrentDirectory ()
74
+ cmfFile , err := cmfInstance .fs .GetFileFromFS (currentDirectory + "/" + defaultCMFFile )
75
+ if err != nil {
76
+ cmfFile , _ = cmfInstance .fs .GetFileFromVirtualFS (defaultYamlFile )
77
+ }
78
+
79
+ extra := map [string ]string {
80
+ "BRANCH_NAME" : cmfInstance .repository .BranchName (),
81
+ }
82
+ message , _ := cmfInstance .templateManager .Run (cmfFile , extra )
83
+ cmfInstance .repository .Amend (message )
73
84
}
74
85
75
86
// InitializeProject initialize current directory with a inner cmf template
You can’t perform that action at this time.
0 commit comments