Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add suffices to scripts in scripts-dev (#12137)
Browse files Browse the repository at this point in the history
* Rename scripts-dev to have suffices

* Update references to `scripts-dev`

* Changelog

* These scripts don't pass mypy
  • Loading branch information
David Robertson authored Mar 2, 2022
1 parent 106959b commit 1fbe031
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# if we're running from a tag, get the full list of distros; otherwise just use debian:sid
dists='["debian:sid"]'
if [[ $GITHUB_REF == refs/tags/* ]]; then
dists=$(scripts-dev/build_debian_packages --show-dists-json)
dists=$(scripts-dev/build_debian_packages.py --show-dists-json)
fi
echo "::set-output name=distros::$dists"
# map the step outputs to job outputs
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
# see https://github.com/docker/build-push-action/issues/252
# for the cache magic here
run: |
./src/scripts-dev/build_debian_packages \
./src/scripts-dev/build_debian_packages.py \
--docker-build-arg=--cache-from=type=local,src=/tmp/.buildx-cache \
--docker-build-arg=--cache-to=type=local,mode=max,dest=/tmp/.buildx-cache-new \
--docker-build-arg=--progress=plain \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install -e .
- run: scripts-dev/generate_sample_config --check
- run: scripts-dev/generate_sample_config.sh --check

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v2
- run: "pip install 'towncrier>=18.6.0rc1'"
- run: scripts-dev/check-newsfragment
- run: scripts-dev/check-newsfragment.sh
env:
PULL_REQUEST_NUMBER: ${{ github.event.number }}

Expand Down
1 change: 1 addition & 0 deletions changelog.d/12137.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Give `scripts-dev` scripts suffixes for neater CI config.
2 changes: 1 addition & 1 deletion docs/code_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,6 @@ frobber:
```
Note that the sample configuration is generated from the synapse code
and is maintained by a script, `scripts-dev/generate_sample_config`.
and is maintained by a script, `scripts-dev/generate_sample_config.sh`.
Making sure that the output from this script matches the desired format
is left as an exercise for the reader!
12 changes: 11 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local_partial_types = True
no_implicit_optional = True

files =
scripts-dev/sign_json,
scripts-dev/,
setup.py,
synapse/,
tests/
Expand All @@ -23,10 +23,20 @@ files =
# https://docs.python.org/3/library/re.html#re.X
exclude = (?x)
^(
|scripts-dev/build_debian_packages.py
|scripts-dev/check_signature.py
|scripts-dev/definitions.py
|scripts-dev/federation_client.py
|scripts-dev/hash_history.py
|scripts-dev/list_url_patterns.py
|scripts-dev/release.py
|scripts-dev/tail-synapse.py

|synapse/_scripts/export_signing_key.py
|synapse/_scripts/move_remote_media_to_new_store.py
|synapse/_scripts/synapse_port_db.py
|synapse/_scripts/update_synapse_database.py

|synapse/storage/databases/__init__.py
|synapse/storage/databases/main/__init__.py
|synapse/storage/databases/main/cache.py
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ check() {

if [ "$1" == "--check" ]; then
diff -u "$SAMPLE_CONFIG" <(synapse/_scripts/generate_config.py --header-file docs/.sample_config_header.yaml) >/dev/null || {
echo -e "\e[1m\e[31m$SAMPLE_CONFIG is not up-to-date. Regenerate it with \`scripts-dev/generate_sample_config\`.\e[0m" >&2
echo -e "\e[1m\e[31m$SAMPLE_CONFIG is not up-to-date. Regenerate it with \`scripts-dev/generate_sample_config.sh\`.\e[0m" >&2
exit 1
}
diff -u "$SAMPLE_LOG_CONFIG" <(synapse/_scripts/generate_log_config.py) >/dev/null || {
echo -e "\e[1m\e[31m$SAMPLE_LOG_CONFIG is not up-to-date. Regenerate it with \`scripts-dev/generate_sample_config\`.\e[0m" >&2
echo -e "\e[1m\e[31m$SAMPLE_LOG_CONFIG is not up-to-date. Regenerate it with \`scripts-dev/generate_sample_config.sh\`.\e[0m" >&2
exit 1
}
else
Expand Down
2 changes: 0 additions & 2 deletions scripts-dev/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ else
"synapse" "docker" "tests"
# annoyingly, black doesn't find these so we have to list them
"scripts-dev"
"scripts-dev/build_debian_packages"
"scripts-dev/sign_json"
"contrib" "synctl" "setup.py" "synmark" "stubs" ".ci"
)
fi
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ lint_targets =
tests
# annoyingly, black doesn't find these so we have to list them
scripts-dev
scripts-dev/build_debian_packages
scripts-dev/sign_json
stubs
contrib
synctl
Expand Down

0 comments on commit 1fbe031

Please sign in to comment.