From a4f042c9dff638d78f8fbaaf06c4f9f3b4231125 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 23 Jun 2024 00:00:41 -0600 Subject: [PATCH] chore: add LICENSE and contributing MD --- .github/workflows/test.yml | 1 - CONTRIBUTING.md | 113 +++++++++++++++++++++++++++++++++++++ LICENSE.md | 21 +++++++ package.json | 3 +- readme.md | 5 ++ 5 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 848357d..c73d38d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,4 +20,3 @@ jobs: cache: pnpm - run: pnpm install - run: pnpm run build - - run: pnpm run test diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..da748c7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,113 @@ + + +# Contributing + +Hey, thanks for your interest in contributing to Dokploy CLI! We appreciate your help and taking your time to contribute. + + +Before you start, please first discuss the feature/bug you want to add with the owners and comunity via github issues. + +We have a few guidelines to follow when contributing to this project: + +- [Commit Convention](#commit-convention) +- [Setup](#setup) +- [Development](#development) +- [Build](#build) +- [Pull Request](#pull-request) + +## Commit Convention + +Before you craete a Pull Request, please make sure your commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +### Commit Message Format +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` + +#### Type +Must be one of the following: + +* **feat**: A new feature +* **fix**: A bug fix +* **docs**: Documentation only changes +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) +* **refactor**: A code change that neither fixes a bug nor adds a feature +* **perf**: A code change that improves performance +* **test**: Adding missing tests or correcting existing tests +* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm) +* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs) +* **chore**: Other changes that don't modify `src` or `test` files +* **revert**: Reverts a previous commit + +Example: +``` +feat: add new feature +``` + + + + +## Setup + +Before you start, please make the clone based on the `main` branch. + +```bash +git clone https://github.com/Dokploy/cli.git +cd cli +pnpm install +``` + +## Development + +First step is to authenticate, you can connect to a dokploy localhost or a remote dokploy server. + +Authenticate + +```bash +./bin/dev.js authenticate +``` + +Let's take the example to create a new command for application called `start`. + +You can use the generators from OCLIF to create a new command. + +```bash +oclif generate command application:start +``` + +To run the command, you can use the following command: + +```bash +./bin/dev.js application:start or ./bin/dev.js start +``` + +## Build + +```bash +pnpm run build +``` + +## Publish + +```bash +pnpm run publish +``` + + +## Pull Request + +- The `main` branch is the source of truth and should always reflect the latest stable release. +- Create a new branch for each feature or bug fix. +- Make sure to add tests for your changes. +- Make sure to update the documentation for any changes Go to the [docs.dokploy.com](https://docs.dokploy.com) website to see the changes. +- When creating a pull request, please provide a clear and concise description of the changes made. +- If you include a video or screenshot, would be awesome so we can see the changes in action. +- If your pull request fixes an open issue, please reference the issue in the pull request description. +- Once your pull request is merged, you will be automatically added as a contributor to the project. + +Thank you for your contribution! + diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4ee1c44 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Mauricio Siu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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. \ No newline at end of file diff --git a/package.json b/package.json index e79d52d..af0a786 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,8 @@ "posttest": "pnpm run lint", "prepack": "oclif manifest && oclif readme", "test": "mocha --forbid-only \"test/**/*.test.ts\"", - "version": "oclif readme && git add README.md" + "version": "oclif readme && git add README.md", + "publish" :"npm publish" }, "types": "dist/index.d.ts" } diff --git a/readme.md b/readme.md index 085bcc3..04c1e76 100644 --- a/readme.md +++ b/readme.md @@ -103,6 +103,11 @@ For more information about a specific command, use: $ dokploy [COMMAND] --help ``` + +## Contributing + +If you want to contribute to Dokploy CLI, please check out our [Contributing Guide](https://github.com/Dokploy/cli/blob/main/CONTRIBUTING.md). + ## Support If you encounter any issues or have any questions, please [open an issue](https://github.com/yourusername/dokploy/issues) in our GitHub repository.