Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ deps_upgrade_project: .state/docker-build-base
translations: .state/docker-build-base
docker compose run --rm base bin/translations

patch: .state/docker-build-base
docker compose run --rm base bin/patch

requirements/%.txt: requirements/%.in
docker compose run --rm base pip-compile --generate-hashes --output-file=$@ $<

Expand Down Expand Up @@ -266,4 +269,4 @@ codeql-test: .state/codeql-packs
codeql-clean:
rm -rf dev/codeql .state/codeql-db .state/codeql-packs .state/codeql-cli

.PHONY: default build serve resetdb initdb shell dbshell tests dev-docs user-docs deps deps_upgrade_all deps_upgrade_project clean purge debug stop compile-pot runmigrations checkdb codeql codeql-db codeql-rebuild codeql-analyze codeql-test codeql-clean
.PHONY: default build serve resetdb initdb shell dbshell tests dev-docs user-docs deps deps_upgrade_all deps_upgrade_project clean purge debug stop compile-pot runmigrations checkdb codeql codeql-db codeql-rebuild codeql-analyze codeql-test codeql-clean patch
22 changes: 22 additions & 0 deletions bin/patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -ex


# NOTE: The ordering of these is important!
# NOTE: We do this as by composing the scripts rather than composing the make
# targets so that they can all run in the same docker container and we
# dont end up spinning up N docker containers.

# We reformat first, as this can automatically fix some of the issues that
# linting catches.
bin/reformat

# Then we lint, because if there are any remaining issues, we want to catch them
# before doing anything else because fixing them may change line numbers so the
# later steps may not be valid after the fix anyways.
bin/lint

# Then we extract our translatable strings, this embeds line numbers of where it
# finds theose strings, so this comes last because if the above changes the
# line numbers at all, this would need to be re-ran.
bin/translations
7 changes: 7 additions & 0 deletions docs/dev/development/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,13 @@ This is useful in scenarios like passing a
TESTARGS="--randomly-seed=1234" make tests
```

You can run the common tools (formaters, linting, translations) to make sure
that a patch is ready by running:

```shell
make patch
```

You can run linters, programs that check the code, with:

```shell
Expand Down
Loading