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: support custom org name #148

Merged
merged 6 commits into from Jul 13, 2021
Merged

feat: support custom org name #148

merged 6 commits into from Jul 13, 2021

Conversation

denangelov
Copy link
Contributor

Description

Modified CLI to support additional argument for a custom organization name.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@felangel felangel changed the title support custom org name feat: support custom org name Jul 12, 2021
Co-authored-by: Felix Angelov <felangelov@gmail.com>
/// Gets the organization name.
List<Map<String, String>> get _orgName {
final orgName =
(_argResults['org-name'] ?? 'com.example.verygoodcore') as String;
Copy link
Contributor

Choose a reason for hiding this comment

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

can we create a constant _defaultOrgName = 'com.example.verygoodcore';?

List<Map<String, String>> get _orgName {
final orgName =
(_argResults['org-name'] ?? 'com.example.verygoodcore') as String;
_validateOrgName(orgName);
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we only need to validate if it's not the default? I think we can return the default early if the user didn't provide a custom org-name.

felangel
felangel previously approved these changes Jul 12, 2021
Copy link
Contributor

@felangel felangel left a comment

Choose a reason for hiding this comment

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

LGTM 💯 :shipit:

@felangel
Copy link
Contributor

@denangelov looks like the build is failing. Let me know if you need help fixing it.

Copy link
Contributor

@felangel felangel left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@felangel felangel added the feature A new feature or request label Jul 13, 2021
@felangel felangel merged commit c0a2970 into main Jul 13, 2021
@felangel felangel deleted the support-org-name branch July 13, 2021 18:02
@felangel felangel mentioned this pull request Jul 14, 2021
7 tasks
@felangel felangel linked an issue Jul 14, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add to the create command --org flag to name the package
2 participants