2 Commits

Author SHA1 Message Date
01ead3bd73 fix win path separator 2023-04-17 14:05:12 -04:00
ae3c13d6d3 just docs 2023-04-17 09:00:36 -04:00
2 changed files with 15 additions and 8 deletions

View File

@@ -35,17 +35,19 @@ The examples directory contains an example-scaffold-projectType.toml configurati
## Naming convention warning
Creating repositories on gitea via a ssh push has a side effect -- the project name is forced to lowercase. There are no configuration options to change this. Please see gitea and it's documentation for full explanations.
Creating repositories on gitea via a ssh push, the standard method, has a side effect -- the project name is forced to lowercase. There are no configuration options to change this. Please see gitea and it's documentation for full explanations.
Here are a couple of thoughts:
1. Adapt and only create projects use lowercase (myspecialproject) or lowersnakecase (my_special_project) or use hyphens between words (my-special-project)
1. Adapt and only create projects using lowercase (myspecialproject) or lower_snake_case (my_special_project) or use hyphens between words (my-special-project)
- all lowercase is universally accepted but hard to read for multi-word project names
- lowersnakecase is not universally accepted
- lower_snake_case is not universally accepted
- hyphens might not be what you are used to, or prefer, but it seems to be universally accepted and reasonably readable.
2. A work around would be to manually create a reposity with the CamelCase name you want via gitea's web UI. And use scaffold with the -g flag
eg. `scaffold -g MySpecialProject go MySpecialProject` to have scaffold clone it, build it out according to your skeleton/templates, and then push the changes.
2. If you insist on CamelCase project names -- a work around would be to manually create a reposity with the CamelCase name you want via gitea's web UI. And then use scaffold on your development machine with the -c flag
eg. `scaffold -c go MySpecialProject` to have scaffold clone it from gitea, build it out according to your skeleton/templates, and then push the changes.
The whole idea or point to little utilities like this is to simplify things - to get what you want. In this case, it seems, that to get what you want means one extra step --OR-- changing your personal preference for the names of things.
## The `scaffold` command
@@ -53,10 +55,11 @@ Here are a couple of thoughts:
| ------- | ----------- |
| scaffold | The program name |
| flags:
-i or -Info | Display the available project types and the build and version information about the program. |
| -g GiteaProjectName | Clone a gitea repository, not create one. Then push the new structure to it. |
-i | Display the available project types and the build and version information about the program. |
| -c | Clone a gitea repository, not create one. Then push the new structure to it. |
| **Examples:** | |
| scaffold *ProjectType* *NewProjectName* | Stuff |
| scaffold *ProjectType* *new-project-name* | Creates a new project and then creates new remote repositories and pushes changes |
| scaffold -c *ProjectType* *GiteaRepositoryName* | clones the repo from gitea and then fills it according to your skeleton/template, and then pushes the changes.|
## Configuration of samples

View File

@@ -81,6 +81,10 @@ func main() {
os.Exit(0)
}
if runtime.GOOS == "windows" {
sep = "\\"
}
// Setup scaffold
u, err := user.Current()
ifFerr("Unable to get current user details", err)