Skip to content

CONTRIBUTING

Michel Roegl-Brunner edited this page Jan 13, 2025 · 4 revisions

Community Scripts Contribution Guide

Welcome to the communty-scripts Repository!

πŸ“œ These documents outline the essential coding standards for all our scripts and JSON files. Adhering to these standards ensures that our codebase remains consistent, readable, and maintainable. By following these guidelines, we can improve collaboration, reduce errors, and enhance the overall quality of our project.

Scope of These Documents

These documents cover the coding standards for the following types of files in our project:

  • install/$AppName-install.sh Scripts: These scripts are responsible for the installation of applications.
  • ct/$AppName.sh Scripts: These scripts handle the creation and updating of containers.
  • json/$AppName.json: These files store structured data and are used for the website.

Each section provides detailed guidelines on various aspects of coding, including shebang usage, comments, variable naming, function naming, indentation, error handling, command substitution, quoting, script structure, and logging. Additionally, examples are provided to illustrate the application of these standards.

By following the coding standards outlined in this document, we ensure that our scripts and JSON files are of high quality, making our project more robust and easier to manage. Please refer to this guide whenever you create or update scripts and JSON files to maintain a high standard of code quality across the project. πŸ“šπŸ”

Let's work together to keep our codebase clean, efficient, and maintainable! πŸ’ͺπŸš€

Getting Started

Before contributing, please ensure that you have the following setup:

  1. Visual Studio Code (recommended for script development)
  2. Recommended VS Code Extensions:

Important Notes


πŸš€ The Application Script (ct/AppName.sh)

  • You can find all coding standards, as well as the structure for this file here.
  • These scripts are responsible for container creation, setting the necessary variables and handling the update of the application once installed.

πŸ›  The Installation Script (install/AppName-install.sh)

  • You can find all coding standards, as well as the structure for this file here.
  • These scripts are responsible for the installation of the application.

πŸš€ Building Your Own Scripts

Start with the template script


🀝 Contribution Process

1. Fork the repository

Fork to your GitHub account

2. Clone your fork on your local environment

git clone https://github.com/yourUserName/ForkName

3. Create a new branch

git switch -c your-feature-branch

4. Change paths in build.func install.func and AppName.sh

To be able to develop from your own branch you need to change https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main to https://raw.githubusercontent.com/[USER]/[REPOSITORY]/refs/head/[BRANCH]. You need to make this change atleast in misc/build.func misc/install.func and in your ct/AppName.sh. This change is only for testing. Before opening a Pull Request you should change this line change all this back to point to https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main.

4. Commit changes (without build.func and install.func!)

git commit -m "Your commit message"

5. Push to your fork

git push origin your-feature-branch

6. Create a Pull Request

Open a Pull Request from your feature branch to the main repository branch. You must only include your $AppName.sh, $AppName-install.sh and $AppName.json files in the pull request.


πŸ“š Pages