Skip to content

Commit

Permalink
mage: Make project name replacement compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Implausiblyfun committed Feb 5, 2022
1 parent 3e47bfa commit a5a8e49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mage.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (Bootstrap) ReplaceProjectName(newName string) {
fmt.Println("Current git path is", out)

// validate naming
splitName := strings.Split(newName, "/");
splitName := strings.Split(newName, "/")
if len(splitName) != 2 {
fmt.Print("You provided \"", newName, "\" as your new name which is not of the form <username>/<project>.",
"If this was intentional edit out this check otherwise fix your input")
Expand Down Expand Up @@ -89,7 +89,7 @@ func (Bootstrap) ReplaceProjectName(newName string) {
}

newBody := strings.ReplaceAll(string(body), "oakmound/game-template", newName)
newBody := strings.ReplaceAll(newBody, "sample-project", projectName)
newBody = strings.ReplaceAll(newBody, "sample-project", projectName)

// lazy way to not touch files that we dont need to
// slow but its just a bootstrap and at least paranoia means that we wont affect asset files and the like
Expand Down

0 comments on commit a5a8e49

Please sign in to comment.