diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..3e94d78 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: undergroundwires \ No newline at end of file diff --git a/.gitignore b/.gitignore index b512c09..b6b0317 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,7 @@ -node_modules \ No newline at end of file +# NPM +node_modules + +# vscode + +.vscode/**/* +!.vscode/extensions.json \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..1249306 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "davidanson.vscode-markdownlint", + "timonwong.shellcheck" + ] +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..01a1c95 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,51 @@ +# Contributing to bump-everywhere + +First off, thanks for taking the time to contribute! 💓 + +You can contribute by: + +- creating pull requests, +- creating or responding to [issues](https://github.com/undergroundwires/bump-everywhere/issues), +- supporting the development and maintainance by [sponsoring me on GitHub](https://github.com/sponsors/undergroundwires) with a single time donation or reccuring donations, see more options in [undergroundwires.dev/donate](https://undergroundwires.dev/donate/), +- giving the project a star, +- or adding a badge in a project you use bump-everywhere, see [support](./README.md#support). + +## Development environment + +If you're using visual studio code, [recommended extensions](./.vscode/extensions.json) would install useful linters and extensions. + +## Style guide + +- Do not introduce any TODO comments, fix them or do not introduce the change. +- Use common sense, simpler is better. + +### Shell scripting + +- Use [ShellCheck](https://www.shellcheck.net/) to lint your code. +- Always check for return values. +- Declare function-specific variables as `local`. +- Declare variables as readonly whenever possible. + - E.g. `local -r ..`, `declare -r ..` or `readonly ..`. +- Send all errors messages to stderr. + - E.g. `>&2 echo 'Error!'`. +- Use always `#!/usr/bin/env bash` shebang. +- Wrap long lines. +- Use `[[ … ]]` over `[ … ]`, `test`. +- Avoid eval at all cost. + +#### Naming conventions + +**Source file names:** + +- Use `kebab-case.sh`. +- For tests, use `.test` suffix such as `.test.sh`. + +**Function names:** + +- Use snake_case. E.g. `my_func() { ... }` +- Prefix functions in files that others files source with a scope name and `::`. E.g. `utilities::has_value() { }`. + +**Variable names**: + +- Use snake_case for local variables. +- Use ALL_CAPS_SEPARATED_WITH_UNDERSCORES for constant and environment variable names. diff --git a/README.md b/README.md index fdfa920..4ee2955 100644 --- a/README.md +++ b/README.md @@ -140,9 +140,11 @@ You can also use following scripts individually (check script files for usage, p ## Support -- Give it a star ⭐ -- Feel free to use the badge in the `README.md` of repository where you use bump-everywhere: - - (it'll look like: [![Auto-versioned by bump-everywhere](https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true)](https://github.com/undergroundwires/bump-everywhere)) +**Sponsor 💕**. Consider one time or recurring donation on [GitHub Sponsors](https://github.com/sponsors/undergroundwires) or [any other way (undrgroundwires.dev/donate)](https://undergroundwires.dev/donate), every penny you leave will help development and maintainance of the project . + +**Star 🤩**. If you do cannot do that you can just give it a star ⭐ . It helps me to see that the project is appreciated. + +**Badge 📛**. If you use the project, feel free to use the badge in the `README.md` of repository where you use bump-everywhere so we can have larger community that can help improving the project. It would look like [![Auto-versioned by bump-everywhere](https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true)](https://github.com/undergroundwires/bump-everywhere)). You can add following in your markdown file: ```markdown [![Auto-versioned by bump-everywhere](https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true)](https://github.com/undergroundwires/bump-everywhere)