@@ -37,14 +37,15 @@ func main() {
37
37
project .ProjectURL = pterm .Sprintf ("github.com/%s/%s" , project .Username , project .Reponame )
38
38
project .ProjectName = pterm .Sprintf ("%s/%s" , project .Username , project .Reponame )
39
39
40
- const cliTemplateURL = "pterm/cli-template"
41
-
42
- pterm .Info .Printfln ("Replacing all '%s' with %s" , pterm .Magenta (cliTemplateURL ), pterm .Magenta (project .ProjectName ))
40
+ const cliTemplatePath = "pterm/cli-template"
41
+ pterm .Info .Printfln ("Replacing all '%s' with %s" , pterm .Magenta (cliTemplatePath ), pterm .Magenta (project .ProjectName ))
43
42
walkOverExt ("go,mod" , func (path string ) {
44
- pterm .Debug .Printfln ("Replacing '%s' in %s with %s" , pterm .Magenta (cliTemplateURL ), path , pterm .Magenta (project .ProjectName ))
45
- replaceAllInFile (path , cliTemplateURL , project .ProjectName )
43
+ pterm .Debug .Printfln ("Replacing '%s' in %s with %s" , pterm .Magenta (cliTemplatePath ), path , pterm .Magenta (project .ProjectName ))
44
+ replaceAllInFile (path , cliTemplatePath , project .ProjectName )
46
45
})
47
46
47
+ replaceAllInFile ("./cmd/root.go" , `Use: "cli-template",` , pterm .Sprintf (`Use: "%s",` , project .Reponame ))
48
+
48
49
pterm .Fatal .PrintOnError (os .Remove (getPathTo ("./README.md" )))
49
50
pterm .Fatal .PrintOnError (os .Rename (getPathTo ("./README.template-setup.md" ), getPathTo ("./README.template.md" )))
50
51
}
0 commit comments