Sync consts backend-frontend (#7016)
* remove version from state and create new script to extract version * fix lint * [autofix.ci] apply automated fixes * fix web/gen script to error on file permissions * [autofix.ci] apply automated fixes * add version to footer * adjust tests * [autofix.ci] apply automated fixes * update changelog * move version back into state * [autofix.ci] apply automated fixes * nits --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Maximilian Hils <git@maximilianhils.com>
This commit is contained in:
parent
59fbbdc4b2
commit
f77327634c
|
@ -16,8 +16,8 @@ def test_version(capsys):
|
|||
assert stdout.strip() == version.VERSION
|
||||
|
||||
|
||||
def test_get_version():
|
||||
version.VERSION = "3.0.0rc2"
|
||||
def test_get_version(monkeypatch):
|
||||
monkeypatch.setattr(version, "VERSION", "3.0.0rc2")
|
||||
|
||||
with mock.patch("subprocess.check_output") as m, mock.patch("subprocess.run") as m2:
|
||||
m2.return_value = True
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
for file in "$script_dir"/*.py; do
|
||||
echo "$file..."
|
||||
"$file"
|
||||
done
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
|
||||
here = Path(__file__).parent.absolute()
|
||||
|
||||
filename = here / "../src/js/backends/consts.ts"
|
||||
|
||||
|
||||
async def make() -> str:
|
||||
# language=TypeScript
|
||||
content = "/** Auto-generated by web/gen/backend_consts.py */\n"
|
||||
|
||||
return content
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
filename.write_bytes(asyncio.run(make()).encode())
|
|
@ -0,0 +1 @@
|
|||
/** Auto-generated by web/gen/backend_consts.py */
|
Loading…
Reference in New Issue