File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ import (
66 "github.com/RohitRavindra-dev/devlocal/internal/filesystem"
77 "github.com/spf13/cobra"
88
9- "github.com/RohitRavindra-dev/devlocal/internal/orchestration /apply"
9+ "github.com/RohitRavindra-dev/devlocal/internal/service /apply"
1010)
1111
1212var applyCmd = & cobra.Command {
1313 Use : "apply" ,
1414 Short : "Apply .devlocal changes that makes the project ready for local developement" ,
1515 PreRunE : func (cmd * cobra.Command , args []string ) error {
16- fmt .Println ("Attempting to apply devlocal changes" )
16+ fmt .Println ("[Started] to apply devlocal changes" )
1717 // check for setup
1818 return filesystem .ValidateDevLocalFilesystem ()
1919 },
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package apply
2+
3+ import (
4+ "fmt"
5+
6+ "github.com/RohitRavindra-dev/devlocal/internal/filesystem"
7+ "github.com/RohitRavindra-dev/devlocal/internal/git"
8+ )
9+
10+ func applyOverlook (overlookFiles []string ) error {
11+ fmt .Println ("[Running] git skip worktree for files: " , overlookFiles )
12+ if len (overlookFiles ) == 0 {
13+ fmt .Println ("[Warn] No files found in overlook section of devlocal config, skipping" )
14+ return nil
15+ }
16+
17+ if err := git .SkipWorkTree (overlookFiles ); err != nil {
18+ return err
19+ }
20+
21+ fmt .Println ("[Completed] git skip worktree" )
22+
23+ return nil
24+
25+ }
26+
27+ func Run () error {
28+ config , err := filesystem .LoadDevlocalConfig ()
29+
30+ if err != nil {
31+ return err
32+ }
33+
34+ // overlook files
35+ if overlookErr := applyOverlook (config .Overlook ); overlookErr != nil {
36+ return overlookErr
37+ }
38+
39+ // TODO: apply patches
40+
41+ return nil
42+ }
You can’t perform that action at this time.
0 commit comments