Skip to content

Commit 63d41a3

Browse files
committed
Development readme section improved
1 parent 6531824 commit 63d41a3

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@qdm12

.github/CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
Contributions are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [open source license of this project](../LICENSE).
4+
5+
## Submitting a pull request
6+
7+
1. [Fork](https://github.com/qdm12/ddns-updater/fork) and clone the repository
8+
1. Create a new branch `git checkout -b my-branch-name`
9+
1. Modify the code
10+
1. Ensure the docker build succeeds `docker build .`
11+
1. Commit your modifications
12+
1. Push to your fork and [submit a pull request](https://github.com/qdm12/ddns-updater/compare)
13+
14+
## Resources
15+
16+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
17+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)

README.md

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,47 @@ To set it up with DDNS updater:
328328
329329
## Development
330330
331-
### Using VSCode and Docker
331+
1. Setup your environment
332332
333-
1. Install [Docker](https://docs.docker.com/install/)
334-
- On Windows, share a drive with Docker Desktop and have the project on that partition
335-
1. With [Visual Studio Code](https://code.visualstudio.com/download), install the [remote containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
336-
1. In Visual Studio Code, press on `F1` and select `Remote-Containers: Open Folder in Container...`
337-
1. Your dev environment is ready to go!... and it's running in a container :+1:
333+
<details><summary>Using VSCode and Docker (easier)</summary><p>
338334
339-
You can probably start looking at the cmd/updater/main.go file which is the entrypoint of the program.
335+
1. Install [Docker](https://docs.docker.com/install/)
336+
- On Windows, share a drive with Docker Desktop and have the project on that partition
337+
- On OSX, share your project directory with Docker Desktop
338+
1. With [Visual Studio Code](https://code.visualstudio.com/download), install the [remote containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
339+
1. In Visual Studio Code, press on `F1` and select `Remote-Containers: Open Folder in Container...`
340+
1. Your dev environment is ready to go!... and it's running in a container :+1: So you can discard it and update it easily!
341+
342+
</p></details>
343+
344+
<details><summary>Locally</summary><p>
345+
346+
1. Install [Go](https://golang.org/dl/), [Docker](https://www.docker.com/products/docker-desktop) and [Git](https://git-scm.com/downloads)
347+
1. Install Go dependencies with
348+
349+
```sh
350+
go mod download
351+
```
352+
353+
1. Install [golangci-lint](https://github.com/golangci/golangci-lint#install)
354+
1. You might want to use an editor such as [Visual Studio Code](https://code.visualstudio.com/download) with the [Go extension](https://code.visualstudio.com/docs/languages/go). Working settings are already in [.vscode/settings.json](https://github.com/qdm12/ddns-updater/master/.vscode/settings.json).
355+
356+
</p></details>
357+
358+
1. Commands available:
359+
360+
```sh
361+
# Build the binary
362+
go build cmd/app/main.go
363+
# Test the code
364+
go test ./...
365+
# Lint the code
366+
golangci-lint run
367+
# Build the Docker image
368+
docker build -t qmcgaw/ddns-updater .
369+
```
370+
371+
1. See [Contributing](https://github.com/qdm12/ddns-updater/master/.github/CONTRIBUTING.md) for more information on how to contribute to this repository.
340372

341373
## Used in external projects
342374

0 commit comments

Comments
 (0)