Skip to content

Commit 04a473b

Browse files
authored
Additions and amends to the CONTIRBUTOR docs (#2983)
* Fixes to the contributor docs * added info about our dev repo * some more clarifications
1 parent 49d7d4a commit 04a473b

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.github/CONTRIBUTOR_AND_GUIDES/CONTRIBUTING.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Before contributing, please ensure that you have the following setup:
4040
- [Shell Format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)
4141

4242
### Important Notes
43-
- Use [AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh) and [AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh) as templates when creating new scripts.
43+
- Use [AppName.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.sh) and [AppName-install.sh](https://github.com/community-scripts/ProxmoxVE/blob/main/.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.sh) as templates when creating new scripts. Final version of the script (the one you will push for review), must have all comments removed, except the ones in the file header.
4444

4545
---
4646

@@ -66,6 +66,12 @@ Start with the [template script](https://github.com/community-scripts/ProxmoxVE/
6666

6767
## 🤝 Contribution Process
6868

69+
All PR's related to new scripts should be made against our Dev repository first, where we can test the scripts before they are pushed and merged in the official repository.
70+
71+
**Our Dev repo is `http://www.github.com/community-scripts/ProxmoxVED`**
72+
73+
You will need to adjust paths mentioned further down this document to match the repo you're pushing the scripts to.
74+
6975
### 1. Fork the repository
7076
Fork to your GitHub account
7177

@@ -80,7 +86,24 @@ git switch -c your-feature-branch
8086
```
8187

8288
### 4. Change paths in build.func install.func and AppName.sh
83-
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/heads/[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`.
89+
To be able to develop from your own branch you need to change:\
90+
`https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main`\
91+
to\
92+
`https://raw.githubusercontent.com/[USER]/[REPOSITORY]/refs/heads/[BRANCH]`\
93+
in following files:
94+
95+
`misc/build.func`\
96+
`misc/install.func`\
97+
`ct/AppName.sh`
98+
99+
Example: `https://raw.githubusercontent.com/tremor021/PromoxVE/refs/heads/testbranch`
100+
101+
Also you need to change:\
102+
`https://github.com/community-scripts/ProxmoxVE/raw/main`\
103+
to\
104+
`https://github.com/[USER]/[REPOSITORY]/raw/[BRANCH]`\
105+
in `misc/install.func` in order for `update` shell command to work.\
106+
These changes are only while writing and testing your scripts. Before opening a Pull Request, you should change all above mentioned paths in `misc/build.func`, `misc/install.func` and `ct/AppName.sh` to point to the original paths.
84107

85108
### 4. Commit changes (without build.func and install.func!)
86109
```bash
@@ -93,7 +116,7 @@ git push origin your-feature-branch
93116
```
94117

95118
### 6. Create a Pull Request
96-
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.
119+
Open a Pull Request from your feature branch to the main branch on the Dev repository. You must only include your **$AppName.sh**, **$AppName-install.sh** and **$AppName.json** files in the pull request.
97120

98121
---
99122

.github/CONTRIBUTOR_AND_GUIDES/ct/AppName.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Example:
7575
>
7676
> - Add your username and source URL
7777
> - For existing scripts, add "| Co-Author [YourUserName]" after the current author
78+
> - Source is a URL of github repo containting source files of the application you're installing (not URL of your homepage or a blog)
7879
7980
---
8081

@@ -95,7 +96,7 @@ Example:
9596
>| Variable | Description | Notes |
9697
>|----------|-------------|-------|
9798
>| `APP` | Application name | Must match ct\AppName.sh |
98-
>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number |
99+
>| `var_tags` | Proxmox display tags without Spaces, only ; | Limit the number to 2 |
99100
>| `var_cpu` | CPU cores | Number of cores |
100101
>| `var_ram` | RAM | In MB |
101102
>| `var_disk` | Disk capacity | In GB |

.github/CONTRIBUTOR_AND_GUIDES/install/AppName-install.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Example:
6767
>
6868
> - Add your username
6969
> - When updating/reworking scripts, add "| Co-Author [YourUserName]"
70+
> - Source is a URL of github repo containting source files of the application you're installing (not URL of your homepage or a blog)
7071
7172
### 1.3 **Variables and function import**
7273

@@ -177,13 +178,16 @@ echo "${RELEASE}" >"/opt/AppName_version.txt"
177178
- Use standard functions like `msg_info`, `msg_ok` or `msg_error` to print status messages.
178179
- Each `msg_info` must be followed with a `msg_ok` before any other output is made.
179180
- Display meaningful progress messages at key stages.
181+
- Taking user input with `read -p` must be outside of `msg_info`...`msg_ok` code block
180182

181183
Example:
182184

183185
```bash
184186
msg_info "Installing Dependencies"
185187
$STD apt-get install -y ...
186188
msg_ok "Installed Dependencies"
189+
190+
read -p "Do you wish to enable HTTPS mode? (y/N): " httpschoice
187191
```
188192

189193
### 6.2 **Verbosity**

0 commit comments

Comments
 (0)