-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added numerous new template files to help with GitHub setup. (CODE_…
…OF_CONDUCT...etc.) - Added shared function process_template to .jcd-new/jcd-new.bashlib - In jcd-new-classlib, changed existing template processing to use process_template - In jcd-new-classlib, added calls to process_template for new template files. - Bumped the version to 0.0.3-alpha in VERSION file.
- Loading branch information
1 parent
616a283
commit 46734bb
Showing
13 changed files
with
288 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,40 @@ You must have the following environment variables defined: | |
|
||
* $FULL_NAME - is required for generating the correct documentation from various template files. | ||
|
||
## Optional, But Useful, Environment Variables | ||
|
||
While you don't need to have the following environment variables defined, they can be helpful: | ||
|
||
* $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. | ||
If you don't want to solicit any funding, remove .github/FUNDING.yml after the project is created. | ||
* $PATREON_ID - This is your id on patreon.com, assuming you have one. If not this entry in .github/FUNDING.yml will be blank. | ||
If you don't want to solicit any funding, remove .github/FUNDING.yml after the project is created. | ||
* $PROJECT_EMAIL - This is the email address where you want people to contact you at regarding this project. | ||
If it's not provided the following will be used: [email protected]; edit CODE_OF_CONDUCT.md | ||
to remove references to it if you do not want people to contact you via email for the project. | ||
|
||
## Setting your environment variables | ||
First off, yes, I know, passing the GITHUB_TOKEN in an environment variable isn't secure. | ||
* **Don't use these scripts for anything sensitive you're working on.** | ||
* **If you don't want to use the GITHUB_TOKEN environment variable, don't use these scripts** ...until I find a suitable | ||
replacement method. | ||
|
||
To set the non-sensitive environment variables edit your ~/.bash_profile and add them in a | ||
manner similar to the script below. | ||
```bash | ||
export github=~/Source/your--personal-github-folder # I keep mine separate from others' for personal edification. | ||
export FULL_NAME="Your Full Name" # or at least how you want it to appear in the LICENSE file. | ||
export GITHUB_USER_NAME=your-github-name | ||
export KOFI_ID=yourkofiname | ||
export PATREON_ID=yourpatreonname | ||
export [email protected] | ||
``` | ||
|
||
Of course, you could set them every time before you run these scripts, but that would be... odd. | ||
|
||
For your GITHUB_TOKEN, you can research secrets managers use those to launch these scripts, | ||
and have it set only for the duration of their run. They're not cheap tho. | ||
|
||
## Advice for the first time you run jcd-new. | ||
|
||
If you're not sure if you'll like the output from jcd-new classlib, do a dry run locally without pushing to GitHub. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.2-alpha | ||
0.0.3-alpha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
#!/bin/bash | ||
# TODO: put reusable functions here and export them | ||
# TODO: put reusable functions here and export them | ||
process_template() { | ||
local template_file="$1" | ||
local output_file="$2" | ||
local out_dir=$(dirname "$output_file") | ||
|
||
# check if we need to put defaults in for any of the params. | ||
if [ -z ${PROJECT_NAME+x} ] | ||
then | ||
PROJECT_NAME="A.Bad.Project.Name.Fix.The.Scripts" | ||
fi | ||
|
||
if [ -z ${GITHUB_USER_NAME+x} ]; then | ||
GITHUB_USER_NAME="not-your-github-username-fix-your-environment-variables" | ||
fi | ||
|
||
if [ -z ${NETSTANDARD_VERSION+x} ]; then | ||
NETSTANDARD_VERSION="2.1" #hopefully this won't cause a problem... | ||
fi | ||
|
||
if [ -z ${PROJECT_EMAIL+x} ]; then | ||
PROJECT_EMAIL="[email protected]" | ||
fi | ||
|
||
if [ -z ${PATREON_ID+x} ]; then | ||
PATREON_ID="" # Not sure this really matters. But let's be specific anyways. | ||
fi | ||
|
||
if [ -z ${KOFI_ID+x} ]; then | ||
KOFI_ID="" # Not sure this really matters. But let's be specific anyways. | ||
fi | ||
|
||
if [ -z ${YEAR+x} ]; then | ||
YEAR=$(date +"Y") | ||
fi | ||
|
||
if [ -z ${FULL_NAME+x} ]; then | ||
FULL_NAME="Not A Real Name" | ||
fi | ||
|
||
mkdir -p "$out_dir" | ||
|
||
# finally process the template making the required substitutions. | ||
cat < "$template_file" | \ | ||
sed "s/{PROJECT_NAME}/$PROJECT_NAME/g" | \ | ||
sed "s/{NETSTANDARD_VERSION}/$NETSTANDARD_VERSION/g" | \ | ||
sed "s/{GITHUB_USER_NAME}/$GITHUB_USER_NAME/g" | \ | ||
sed "s/{PROJECT_EMAIL}/$PROJECT_EMAIL/g" | \ | ||
sed "s/{PATREON_ID}/$PATREON_ID/g" | \ | ||
sed "s/{KOFI_ID}/$KOFI_ID/g" | \ | ||
sed "s/{YEAR}/$YEAR/g" | \ | ||
sed "s/{FULL_NAME}/$FULL_NAME/g" \ | ||
> "$output_file" | ||
} | ||
|
||
export process_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# These are supported funding model platforms | ||
|
||
patreon: {PATREON_ID} | ||
ko_fi: {KOFI_ID} | ||
|
35 changes: 35 additions & 0 deletions
35
src/.jcd-new/templates/.github/ISSUE_TEMPLATE/bug_report.md.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help drive improvements | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
17 changes: 17 additions & 0 deletions
17
src/.jcd-new/templates/.github/ISSUE_TEMPLATE/feature_request.md.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making | ||
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, | ||
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, | ||
religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take | ||
appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, | ||
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any | ||
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the | ||
project or its community. Examples of representing a project or community include using an official project e-mail a | ||
ddress, posting via an official social media account, or acting as an appointed representative at an online or offline | ||
event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team | ||
at {PROJECT_EMAIL}. The project team will review and investigate all complaints, and will respond in a way | ||
that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard | ||
to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent | ||
repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at | ||
[http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contributing | ||
|
||
When contributing to this repository, please first discuss the change you wish to make via an issue, | ||
email, or any other method deemed appropriate by the owner of this repository before making a change. | ||
|
||
Please note there is a [code of conduct](CODE_OF_CONDUCT.md.template), please follow it in all your interactions | ||
with the project. | ||
|
||
## Pull Request Process | ||
|
||
1. Ensure any install or build dependencies are removed before the end of the layer when doing a | ||
build. | ||
2. Update the README.md with details of changes to the interface, this includes new environment | ||
variables, exposed ports, useful file locations and container parameters. | ||
3. Increase the version number in the VERSION file to the new version that this Pull Request would | ||
represent. The versioning scheme we use is [SemVer](http://semver.org/). | ||
4. You may merge the Pull Request in once you have the sign-off of one other developer, or if you | ||
do not have permission to do that, you may request the second reviewer to merge it for you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Pull Request Template | ||
|
||
## Description | ||
|
||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. | ||
List any dependencies that are required for this change. | ||
|
||
Fixes # (issue) | ||
|
||
## Type of change | ||
|
||
Please delete options that are not relevant. | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
- [ ] This change requires a documentation update | ||
|
||
## How Has This Been Tested? | ||
|
||
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also | ||
list any relevant details for your test configuration | ||
|
||
- [ ] Test A | ||
- [ ] Test B | ||
|
||
**Test Configuration**: | ||
* Firmware version: | ||
* Hardware: | ||
* Toolchain: | ||
* SDK: | ||
|
||
## Checklist: | ||
|
||
- [ ] My code follows the style guidelines of this project | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] I have checked my code and corrected any misspellings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters