diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6cdd156 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +max_line_length = 120 +tab_width = 4 +trim_trailing_whitespace = true + +[{*.md, LICENSE}] +max_line_length = 80 diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 0000000..dc0e639 Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/commitlint.config.js b/.github/commitlint.config.js new file mode 100644 index 0000000..33790e9 --- /dev/null +++ b/.github/commitlint.config.js @@ -0,0 +1,34 @@ +module.exports = { + rules: { + 'body-leading-blank': [2, 'always'], + 'body-max-line-length': [2, 'always', 100], + 'header-max-length': [2, 'always', 100], + 'scope-case': [2, 'always', 'lower-case'], + 'subject-case': [ + 2, + 'never', + ['start-case', 'pascal-case', 'upper-case'], + ], + 'subject-empty': [2, 'never'], + 'subject-full-stop': [2, 'never', '.'], + 'type-enum': [ + 2, + 'always', + [ + 'chore', + 'build', + 'ci', + 'docs', + 'feat', + 'feat!', + 'fix', + 'perf', + 'refactor', + 'test' + ], + ], + 'type-case': [2, 'always', 'lower-case'], + 'type-empty': [2, 'never'], + 'signed-off-by': [2, 'always'] + } +}; diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..759eb33 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 + +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/.github/workflows" + schedule: + interval: "daily" diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml new file mode 100644 index 0000000..5d0da25 --- /dev/null +++ b/.github/workflows/commit-lint.yml @@ -0,0 +1,23 @@ +name: Lint commit message + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Clone + uses: actions/checkout@v4 + + - name: Setup node 20 + uses: actions/setup-node@v4 + with: + node-version: "20" + check-latest: true + + - name: Install commitlint + run: npm install -g @commitlint/cli @commitlint/config-conventional + + - name: Lint commit message + run: echo "${{ github.event.head_commit.message }}" | commitlint --config .github/commitlint.config.js diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..87cfb9b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "streetsidesoftware.code-spell-checker", + "editorconfig.editorconfig", + "davidanson.vscode-markdownlint", + "sonarsource.sonarlint-vscode", + "wayou.vscode-todo-highlight", + "redhat.vscode-yaml" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..00189cc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "cSpell.language": "en", + "editor.formatOnSave": true, + "editor.wordWrap": "on", + "editor.rulers": [ + 80, + 120 + ], + "cSpell.words": [ + "ddir", + "yannickkirschen" + ], + "autopep8.args": [ + "--max-line-length=140" + ] +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..abc7c35 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,5 @@ +# Code of Conduct + +Actually, the author is hungry and does not want to write a novel here. So, +please just act like a normal human and treat others the same way as you want to +be treated. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..85d55ce --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing + +When contributing to this repository, please first discuss the change in the +discussions. + +Please note we have a code of conduct, please follow it in all your interactions +with the project. + +## Coding + +1. Fork the repository. +2. Make your changes on a dedicated branch. +3. Commit your changes according + to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0). + Please try to only make one commit. Squash/rebase if you made a bunch of + fix-up-commits! Commits will be linted on every push. +4. Open up a pull request by using the `Fix`, `Feature` or `Breaking` pull + request template and follow the steps described there. +5. Merge the pull request as described in the template and make + a [release](#release) if required. + +## Release + +Open an issue by using the template `Release` and follow the steps in there. diff --git a/Formulas/ddir/ddir.rb b/Formulas/ddir/ddir.rb new file mode 100644 index 0000000..801e4c5 --- /dev/null +++ b/Formulas/ddir/ddir.rb @@ -0,0 +1,17 @@ +class Ddir < Formula + desc "Diff a directory and sync changes." + homepage "https://github.com/yannickkirschen/ddir" + url "https://github.com/yannickkirschen/ddir/archive/refs/tags/3.0.1.zip" + sha256 "bd7a9d052c1a726d3fd85489cee78e85bd421bad5f6f9108fb26a1da4d6e4e2b" + license :public_domain + + depends_on "python@3.12" + + def install + virtualenv_install_with_resources + end + + test do + system "#{bin}/ddir", "--version" + end + end diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..a8643aa --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Brew formulas for ddir + +You can install [ddir](https://github.com/yannickkirschen/ddir) by executing: + +```bash +brew tap yannickkirschen/ddir +brew install ddir +```