Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: charmil init command #170

Merged
merged 4 commits into from Jul 23, 2021
Merged

feat: charmil init command #170

merged 4 commits into from Jul 23, 2021

Conversation

ankithans
Copy link
Member

@ankithans ankithans commented Jul 22, 2021

Closes #164 #165

Tasks

Charmil init command will clone the starter repo and set it up according to details provided by the user.

  • Get prompts for Owner, repo and CLI Name
  • Configure the starter repo with templates
  • Clone the starter repo
  • Replace template placeholders with prompts taken from user - ignore .git, .github, .chglog etc

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation change

@ankithans ankithans added the enhancement New feature or request label Jul 22, 2021
@ankithans ankithans self-assigned this Jul 22, 2021
@ankithans ankithans linked an issue Jul 22, 2021 that may be closed by this pull request
@ankithans ankithans marked this pull request as ready for review July 23, 2021 08:00
@ankithans
Copy link
Member Author

Working:

image

@ankithans
Copy link
Member Author

ankithans commented Jul 23, 2021

@wtrocki can I transfer this repo https://github.com/ankithans/charmil-starter-template to aerogear?
Can add a Makefile and setup code in this repo, to setup without charmil init. manually cloning and make setup.

@ankithans ankithans requested a review from a team July 23, 2021 08:31
}

// ignore folders
ignoreSlice := []string{".git", ".github", ".chglog", ".goreleaser.yml", "CONTRIBUTING.md", "bin"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we have this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to ignore these folders, while applying template

Copy link
Contributor

@wtrocki wtrocki Jul 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I get it but... why? Those are useful files that are part of starter

Copy link
Member Author

@ankithans ankithans Jul 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have any templates defined in these folders and some of these were creating some error while applying templates. So I had to do this.
no need to walk through the files with no templates.
But these will be generated untouched as it is.

@wtrocki wtrocki merged commit 034a051 into main Jul 23, 2021
@wtrocki wtrocki deleted the charmil-init branch July 23, 2021 08:38
@namit-chandwani
Copy link
Member

namit-chandwani commented Jul 23, 2021

@ankithans I'm getting a repository already exists error every time I try to use charmil init:

./charmil init

GitHub Organization or Username: namit-chandwani
GitHub Repo Name: trial-cli
CLI Name: trial
repository already exists

Am I running this correctly?

@ankithans
Copy link
Member Author

okay got it, this works if .git doesn't exist. Will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate Starter with Charmil init command Create go templates for starter CLI
3 participants