Skip to content

Commit

Permalink
docs: update local development docs (#29479)
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkingGoose authored Jun 7, 2024
1 parent faacbbc commit be93ca7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/development/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ For example, if you think anything is unclear, or you think something needs to b

You need the following dependencies for local development:

- Git `>=2.33.0`
- Git `>=2.45.1`
- Node.js `^18.12.0 || >=20.0.0`
- pnpm `^8.6.11` (use corepack)
- pnpm `^9.0.0` (use corepack)
- C++ compiler

We recommend you use the version of Node.js defined in the repository's `.nvmrc`.
Expand Down Expand Up @@ -40,7 +40,7 @@ If you already installed a part, skip the corresponding step.
- Install [Git](https://git-scm.com/downloads). Make sure you've [configured your username and email](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)
- Install [Node.js LTS](https://nodejs.org/en/download/)
- In an Administrator PowerShell prompt, run `npm install -global npm` and then `npm --debug install --global windows-build-tools`
- Enable corepack: `corepack enable`
- Enable corepack with: `corepack enable`

You can see what versions you're using like this:

Expand Down Expand Up @@ -69,13 +69,13 @@ pnpm build
#### Local Docker

If, for some reason, you can't run the relevant versions on your local machine, you can run everything from a Docker image.
To build the correct docker image:
To build the correct Docker image:

```
docker build -f .devcontainer/Dockerfile -t renovatebot_local .
```

Starting from Docker Engine 23.0 and Docker Desktop 4.19, Docker uses Buildx by default.
Starting from Docker Engine `23.0` and Docker Desktop `4.19`, Docker uses Buildx by default.
So you must run the following command to get the image loaded to the Docker image store:

```
Expand Down Expand Up @@ -116,14 +116,14 @@ It's possible to do this against GitHub, GitLab or Bitbucket public servers.

### Register new account (optional)

If you're going to be doing a lot of Renovate development then it's recommended that you set up a dedicated test account on GitHub or GitLab, so that you reduce the risk that you accidentally cause problems when testing out Renovate.
If you're going to be doing a lot of Renovate development then we recommend that you set up a dedicated test account on GitHub or GitLab, so that you reduce the risk that you accidentally cause problems when testing out Renovate.

e.g. if your GitHub username is "alex88" then maybe you register "alex88-testing" for use with Renovate.

### Generate platform token

Once you have decided on your platform and account, log in and [generate a "Personal Access Token"](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) that can be used to authenticate Renovate.
Select **repo** scope when generating the token.
Select the **repo** scope when generating the token.

### Export platform token

Expand All @@ -132,8 +132,8 @@ You are better off to instead export the Environment Variable `RENOVATE_TOKEN` f

### Run against a real repo

To make sure everything is working, create a test repo in your account, e.g. like `https://github.com/r4harry/testrepo1`.
Now, add a file called `.nvmrc` with the content `8.13.0`.
To make sure everything is working, create a test repository in your account, e.g. like `https://github.com/r4harry/testrepo1`.
Now, add a file called `.nvmrc` with the content `20.0.0`.
Now run against the test repo you created, e.g. `pnpm start r4harry/testrepo1`.
If your token is set up correctly, you should find that Renovate created a "Configure Renovate" PR in the `testrepo1`.

Expand Down Expand Up @@ -180,15 +180,14 @@ First of all, never commit to the `main` branch of your fork - always use a "fea
Make sure your fork is up-to-date with the Renovate `main` branch, check this each time before you create a new branch.
To do this, see these GitHub guides:

[Configuring a remote for a fork](https://help.github.com/articles/configuring-a-remote-for-a-fork/)

[Syncing a fork](https://help.github.com/articles/syncing-a-fork/)
- [Configuring a remote for a fork](https://help.github.com/articles/configuring-a-remote-for-a-fork/)
- [Syncing a fork](https://help.github.com/articles/syncing-a-fork/)

## Tips and tricks

### Log files

Usually, `debug` is good enough to troubleshoot most problems or verify functionality.
Usually the `debug` log level is good enough to troubleshoot most problems or verify functionality.

It's usually easier to have the logs in a file that you can open with a text editor.
You can use a command like this to put the log messages in a file:
Expand All @@ -197,7 +196,8 @@ You can use a command like this to put the log messages in a file:
LOG_LEVEL=debug pnpm start myaccount/therepo > debug.log
```

The example command will redirect/save Renovate's output to the `debug.log` file (and overwrite `debug.log` if it already exists).
The example command will redirect and save Renovate's output to the `debug.log` file.
Warning: the command will overwrite a existing `debug.log`!

### Adding configuration options

Expand Down

0 comments on commit be93ca7

Please sign in to comment.