this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

add support for gitmodules

pomdtr 0aa71ba7 6b6baed6

+21
+21
cmd/install.go
··· 2 2 3 3 import ( 4 4 "fmt" 5 + "os" 5 6 "os/exec" 6 7 "path/filepath" 7 8 "regexp" ··· 57 58 58 59 if len(branches) == 0 { 59 60 return fmt.Errorf("no branches found in the repository") 61 + } 62 + 63 + if _, err := os.Stat(filepath.Join(k.String("dir"), ".gitmodules")); err == nil { 64 + if slices.Contains(branches, "smallweb") { 65 + addCmd := exec.Command("git", "submodule", "add", "--branch", "smallweb", repoUrl, appDir) 66 + if err := addCmd.Run(); err != nil { 67 + return fmt.Errorf("failed to add submodule: %w", err) 68 + } 69 + 70 + cmd.PrintErrf("App %s available at https://%s.%s\n", appName, appName, k.String("domain")) 71 + return nil 72 + } 73 + 74 + addCmd := exec.Command("git", "submodule", "add", repoUrl, appDir) 75 + if err := addCmd.Run(); err != nil { 76 + return fmt.Errorf("failed to add submodule: %w", err) 77 + } 78 + 79 + cmd.PrintErrf("App %s available at https://%s.%s\n", appName, appName, k.String("domain")) 80 + return nil 60 81 } 61 82 62 83 if slices.Contains(branches, "smallweb") {