jason-c-daniels / jcd-new Goto Github PK
View Code? Open in Web Editor NEWA set of shell scripts (bash) that I use for automating netcore/netstandard repo creation, with GitHub integration.
License: MIT License
A set of shell scripts (bash) that I use for automating netcore/netstandard repo creation, with GitHub integration.
License: MIT License
Request
Add a template for generating an empty solution, but with the rest of the scaffolding for GitHub integration and linking of GitHub integration files into a solution folder.
Depends on #8
Description
I would like a command similar to classlib
(perhaps just sln
or solution
or both) that will generate an empty solution file. It would also contain a README.md that doesn't mention class libraries or .NET Standard.
Some example executions are below:
# Create the solution and repo locally, not pushing to GitHub, and targeting .NET 6.
jcd-new sln --no-github --project-name=My.Cool.Project
# Create the solution and push to GitHub
jcd-new solutlon --project-name=My.Other.Cool.Project
Describe alternatives you've considered
jcd-new classlib
could be used to generate the solution and I could scrap the projects it already generated. But this would take a lot longer to execute as the current script creates three projects, links them up, and then builds the output.release.sh
does not output the zip file to parent folder when specifying .. as the destination.
List the steps to Reproduce the behavior:
cd
into the repository directorybash ./release.sh ..
The zip file is created in the current directory.
The zip file should have been created in the parent directory.
If applicable, add console output/log files to help explain the problem.
Problem
Storing a GitHub token in the environment is somewhat risky, no matter how short lived.
Possible resolution
Perhaps provide a flag that indicates if gh auth login
or gh auth login --with-token < some-token-file.txt
can be used to help people better secure their GitHub secrets.
Workaround considered:
A secrets manager wrapper that only sets the environment for the course of that run.
I've not found any (yet) that run in git-bash. Even with this workaround, there's a chance that the process could get compromised exposing the secret. Albeit the window of opportunity is much lower.
Request
The current classlib/README.md.template
file contains a lot of good information to get someone up and running. However, it doesn't inform the user of the existence, purpose or importance of the files under .github
, nor does it advise the user to review the contents of LICENSE, CODE_OF_CONDUCT.md, CONTRIBUTING.md, nor PULL_REQUEST_TEMPLATE.md.
Proposed Resolution
The generated README.md would contain instructions listing the files that need review, as they're not loaded with the project/solution.
Alternative
The only other alternative is really a complementary feature. Automate adding these very files to a couple of solution folders. It's still very important that the user know to review the files to ensure they agree with their content.
Additional Context
This is to ensure that when people other than the author of these scripts runs the scripts, they are aware of important aspects of both the default LICENSE (currently MIT) and the GitHub integration files.
Request
Please automatically add the following files to one or more solution folders when creating a new project. (classlib, app, sln...etc.):
Describe the solution you'd like
I would like at least one solution folder where these files show up, so that I don't need to search for them in the file system, when I need them.
Alternative
Manually create the solution folder(s) and add these files right after executing jcd-new classlib.
Additional context
Implementing this would act as a time saver.
When executing jcd-new classlib
add the ability to specify that the class library will be a .NET (core) class library and not a .NET Standard library.
Add flags/parameters such as --type=<netstandard|netcore...etc> or replace --netstandard-version (-nsv=...) with --dotnet-version=<netstandard1.0|...etc.> (-dnv=...)
Manually change the output after generating the project and solution. This, of course, means not automating the generation of something that I specifically want to automate...
This is to support as many use cases as possible. Who knows what reason I'll have for wanting a .NET (not-standard) library.
Request Summary
Change the first three titles to Request; Proposed Resolution; and Alternatives. Add User Story and Task types.
Proposed Resolution
Alternatives
Different headings? Maybe. Still requires an update tho...
Additional context
This is to save time when creating new items.
Add the ability to suppress the initial commit to git when executing jcd-new classlib
.
Add a flag named something like --no-commit
or --no-initial-commit
(-nc/-nic) to suppress the initial commit of a repository.
None, really.
This is to allow people seeking to control the presentation of their repository to have detailed control over what's committed and when. This is useful if someone is creating a Commercially or Infectiously (GPL) licensed piece of software. Having a commit with a more permissive license in the repository history could open legal questions the repository owner just doesn't want to answer. Having this flag will give them that control. But also require them to manually commit, manually push...etc. Basically it removes half the reason for these scripts existing.
Request
Update release.sh to check if git
is installed and in the path.
Desired Resolution
When executed on a system without git
in the PATH, the release script should issue a warning indicating it couldn't find git
in the path and then terminate.
Additional context
This is really just to provide a user friendly message and graceful exit if git
isn't installed.
Refactor parts of classlib
into functions in the common library.
Examples include:
jcd-new classlib
still functions as expected.Other commands will be added that can leverage these steps. Having them broken out into reusable functions will a) make classlib
easier to read and b) make it easier to code new commands.
Request
Add the ability to specify which OSS License will populate the LICENSE file.
Proposed Solution
Add a command line parameter that indicates which OSS license should be populated into the LICENSE file.
# An example run using an MIT license could look something like this. (the -lic param sets it)
jcd-new classlib -ngh -p=My.Cool.Library -lic=MIT
# An example run using an BSD license could look something like this. (the -lic param sets it)
jcd-new classlib -ngh -p=My.Cool.Library --license=BSD
Describe alternatives you've considered
Additional context
This is to allow users to better control the results of what's generated by the tools.
See: https://opensource.org/licenses for various licenses
Request
Add a project template for standalone .NET (Core) console applications.
Description
I would like a command similar to classlib
(perhaps just app
) that will generate a .NET (Core) application, defaulting to .NET 6, with an option to let me select an older version.
Some sample executions are below:
# Create the app and repo locally, not pushing to GItHub, and targeting .NET 6.
jcd-new console-app --no-github --project-name=My.Cool.App
# Create the app targeting .NET 5, and push it to GitHub right away.
jcd-new console-app --project-name=My.Cool.But.Older.App --net-app-version=net5.0
# Create the app targeting .NET Core 3.1, and push it to GitHub right away.
jcd-new console-app --project-name=My.Cool.But.Much.Older.App --net-app-version=netcoreapp3.1
Describe alternatives you've considered
jcd-new classlib
could be used to house just the solution and then manually create the application type I want. That would get me the rest of the scaffolding. But the template for the README.md is clearly geared towards libraries, not apps.Request
Add a check to install.sh
to warn if the installation location isn't in the PATH.
Proposed Resolution
Display a message to the user indicating that the requested installation location is not listed in the PATH environment variable. Perhaps even prompt the user to continue as well.
An example run might resemble
# inside of the unzipped folder for a release.
$ bash ./install.sh ~/valid-but-not-in-my-path
WARNING: /home/userfolder/valid-but-not-in-my-path is not currently in your PATH.
You will need to add it to your PATH before being able to execute the scripts.
Are you sure you want to continue [y,N]?
Alternatives
The only alternative is to manually check this before running install.sh
.
Additional context
This is to keep the user aware of the results of their installation and hopefully will prompt action on their part, if they intended it to be in their PATH.
PULL_REQUEST_TEMPLATE.md has too generic of wording and need to be more specific to this project. As well ./github/ISSUE_TEMPLATE/bug_report.md and the project template version have some minor formatting issues that need addressing.
This is to provide an improved user experience when filling out the pull request and bug reports.
Request
Update release.sh to check if zip
is installed and in the path.
Desired Resolution
When executed on a system without zip
in the PATH, the release script should issue a warning indicating it couldn't find zip
in the path and then terminate.
Additional context
This is really just to provide a user friendly message and graceful exit if zip
isn't installed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.