{"id":25615379,"url":"https://github.com/jason-c-daniels/jcd-new","last_synced_at":"2025-08-07T23:22:30.295Z","repository":{"id":50614269,"uuid":"417717107","full_name":"jason-c-daniels/jcd-new","owner":"jason-c-daniels","description":"A set of shell scripts (bash) that I use for automating netcore/netstandard repo creation, with GitHub integration.","archived":false,"fork":false,"pushed_at":"2024-03-13T17:04:31.000Z","size":120,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-14T18:10:43.558Z","etag":null,"topics":["bash","bash-script","github-integration","netcore","netstandard","project-templates"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jason-c-daniels.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"jasoncdaniels","ko_fi":"jasoncdaniels"}},"created_at":"2021-10-16T04:37:15.000Z","updated_at":"2022-08-07T19:12:28.000Z","dependencies_parsed_at":"2022-08-12T21:50:40.849Z","dependency_job_id":null,"html_url":"https://github.com/jason-c-daniels/jcd-new","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-c-daniels%2Fjcd-new","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-c-daniels%2Fjcd-new/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-c-daniels%2Fjcd-new/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-c-daniels%2Fjcd-new/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jason-c-daniels","download_url":"https://codeload.github.com/jason-c-daniels/jcd-new/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240119099,"owners_count":19750599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","github-integration","netcore","netstandard","project-templates"],"created_at":"2025-02-22T03:19:35.726Z","updated_at":"2025-02-22T03:19:36.446Z","avatar_url":"https://github.com/jason-c-daniels.png","language":"Shell","funding_links":["https://patreon.com/jasoncdaniels","https://ko-fi.com/jasoncdaniels"],"categories":[],"sub_categories":[],"readme":"# `jcd-new`\n\nA set of bash scripts and file templates to help create various dotnet solution structures. *(Currently just class libraries)*\n\n## Examples\n```bash\n# Create a .NET Standard 2.1 class library and push it to github \njcd-new classlib --project-name=Jcd.Delete.Me1\njcd-new classlib --project=Jcd.Delete.Me2\njcd-new classlib -p=Jcd.Delete.Me3\n\n# Create a .NET 6.0 class library and push it to GitHub \njcd-new classlib -p=Jcd.Delete.Me1 --framework=net6.0\njcd-new classlib -p=Jcd.Delete.Me1 -f=net6.0\n\n# Create a .NET Standard 1.0 class library and push it to GitHub \njcd-new classlib -p=Jcd.Delete.Me1 --netstandard-version=1.0\njcd-new classlib -p=Jcd.Delete.Me1 -nsv=1.0\n\n# Create a class library, perform the initial local commit, but DO NOT push it to GitHub \njcd-new classlib -p=Jcd.Delete.Me4 --no-github \njcd-new classlib -p=Jcd.Delete.Me5 -ngh\n\n# Create a class library, DO NOT perform the initial local commit nor push it to GitHub \njcd-new classlib -p=Jcd.Delete.Me6 --no-commit \njcd-new classlib -p=Jcd.Delete.Me7 -nc\n\n# Create a class library, with the BSD 1-Clause license, and push to GitHub \njcd-new classlib -p=Jcd.Delete.Me8 --license=BSD-1\njcd-new classlib -p=Jcd.Delete.Me9 -lic=BSD-1\n\n# Display the version number for jcd-new\njcd-new version\njcd-new --version\njcd-new classlib --version\n\n# Get help on using jcd-new\njcd-new help\n\n# get help on using jcd-new classlib\njcd-new help classlib\n```\n\n## Installation from this GitHub repository.\n\n### First find a suitable installation location\n\nTo find a suitable location you can execute one of the following commands.\n```bash\n# List PATH locations from just your HOME directory \necho \"${PATH//:/$'\\n'}\" | sort -u | grep \"$HOME\"\n\n# List all PATH locations (some of these will require admin privileges) \necho \"${PATH//:/$'\\n'}\" | sort -u \n\n# List all PATH locations excluding your HOME directory (all of these will require admin privileges) \necho \"${PATH//:/$'\\n'}\" | sort -u | grep -v \"$HOME\"\n```\n\n### Next run `install.sh` from the src directory of your clone of this repository\n```bash\n# $THIS_GIT_REPO needs to be set to the directory where you cloned this repository, or you can manually substitute the correct value.\ncd $THIS_GIT_REPO/src\n\n# install to ~/bin\nbash ./install.sh\n\n# install to ~/bin2 (which will need to already exist.)\nbash ./install.sh ~/bin2\n\n# Now verify the installation worked\njcd-new --version\n```\n\n## Required External Tools\n\n* gh - This is the GitHub command-line. It's required to automatically upload your code to GitHub.\n  On Windows this is available through chocolatey via: ```choco install gh```\n  To install on linux see this document: https://github.com/cli/cli/blob/trunk/docs/install_linux.md\n\n* dotnet - This is the .NET Core command-line. It's required to create the project structure. \n  See [Microsoft's page](https://dotnet.microsoft.com/en-us/download) for installation instructions.\n\n## Required Environment Variables\n\nYou must have the following environment variables defined:\n* github - must point to the root folder for your personal GitHub repositories.\n\n* GITHUB_USER_NAME - is required for generating the correct documentation from various template files.\n\n* FULL_NAME - is required for generating the correct documentation from various template files.\n\n## Optional, But Useful, Environment Variables \n\nWhile you don't need to have the following environment variables defined, they can be helpful:\n\n* KOFI_ID - This is your id on ko-fi.com, assuming you have one. If not provide this entry in .github/FUNDING.yml will be blank.\n  If you don't want to solicit any funding, remove .github/FUNDING.yml after the project is created.\n* PATREON_ID - This is your id on patreon.com, assuming you have one. If not this entry in .github/FUNDING.yml will be blank.\n  If you don't want to solicit any funding, remove .github/FUNDING.yml after the project is created.\n* PROJECT_EMAIL - This is the email address where you want people to contact you at regarding this project.\n  If it's not provided the following will be used: project.email@not.a.real.domain.org; edit CODE_OF_CONDUCT.md\n  to remove references to it if you do not want people to contact you via email for the project.\n* NUGET_PACKAGE_ICON_URL - This is the URL to the image that will be used when packaging the nuget package. If it's \n  not provided the default nuget icon will be used.\n\n## Optional, Deprecated, Environment Variable\n\n* GITHUB_TOKEN - this will be used, if present, but issue a warning about it being a security risk.\n\n## Setting your environment variables\nFirst off, yes, I know, passing the GITHUB_TOKEN in an environment variable isn't secure. \nBut I allow for it, if the user insists. Hey. It's your system. Who am I to tell you how to manage it?\nThe script does warn if this is used. So anyone inspecting the logs from a run will see the warning.\n\nTo set the non-sensitive environment variables edit your ~/.bash_profile or ~/.profile and add them \nin a manner similar to the script below. (*Which file to use depends entirely on which OS you're using\nand how you've configured your account on it.*)\n```bash\nexport github=~/Source/your-personal-github-folder # I keep mine separate from others' for personal edification. \nexport FULL_NAME=\"Your Full Name\" # or at least how you want it to appear in the LICENSE file.\nexport GITHUB_USER_NAME=your-github-name\nexport KOFI_ID=yourkofiname\nexport PATREON_ID=yourpatreonname\nexport PROJECT_EMAIL=your.oss.email@some.email.com\nexport NUGET_PACKAGE_ICON_URL=\"https://some.imagehost.com/image-url-goes-here\"\n```\n\nOf course, you could set them every time before you run these scripts, but that would be... odd.\n\n## Advice for the first time you run jcd-new.\n\nIf you're not sure if you'll like the output from jcd-new classlib, do a dry run locally without pushing to GitHub.\nTo do that pass the --no-github (-ngh) flag.\n```bash\n# An example of what that might look like follows:\njcd-new classlib --no-githhub --project-name=My.Test.Project\n```\nAfter generating your test project, inspect the output to see if it's what you desire. Don't just open the solution in\nyour IDE and verify it compiles (It should have as part of the project creation.) Actually read the text contents of the\n.csproj files. Ensure they contain exactly what you want and/or expected.\n\n## Why did I use bash instead of the built-in templating features in `dotnet new`?\n\n*Simply put: Familiarity, control, simplicity, and cross-platform compatibility concerns.*\n\nMuch of what I do in these scripts just is unsuitable for a `dotnet new` template, thus requiring wrapper script to call\nthe custom `dotnet new` template. That template would have to be independently maintained as a nuget package. This would \ncomplicate the whole process. I have no want for that complexity. \n\nOn top of that, the wrapper script would have been so remarkably similar to what I currently have (i.e. netstandard1.0 \npost-processing would still be required) making the whole exercise a moot point and more time-consuming. Instead, I chose\nto execute the `dotnet` command-line to achieve the same results.\n\nDon't get me wrong tho, the `dotnet new` templating engine is quite impressive and VERY useful. It's just not appropriate \nfor this use case at this time.\n\nFinally, these scripts are for my own personal use. They're shared on GitHub just in case others might take inspiration \nfrom them, or perhaps even find them directly useful. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-c-daniels%2Fjcd-new","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjason-c-daniels%2Fjcd-new","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-c-daniels%2Fjcd-new/lists"}