moving build file into tools, keep rootdir clean (#1434)

* moving build file into tools, keep rootdir clean

* formatting

* make flake happy
This commit is contained in:
dni ⚡ 2023-02-01 17:19:56 +01:00 committed by GitHub
parent 3ac6a98adc
commit 0dffb2c1a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 6 deletions

View file

@ -14,7 +14,7 @@ COPY . .
RUN poetry config virtualenvs.create false
RUN poetry install --only main
RUN poetry run python build.py
RUN poetry run python tools/build.py
ENV LNBITS_PORT="5000"
ENV LNBITS_HOST="0.0.0.0"

View file

@ -92,7 +92,7 @@ python3.9 -m venv venv
# create the data folder and the .env file
mkdir data && cp .env.example .env
# build the static files
./venv/bin/python build.py
./venv/bin/python tools/build.py
```
#### Running the server

View file

@ -6,7 +6,7 @@ authors = ["Alan Bits <alan@lnbits.com>"]
[tool.poetry.build]
generate-setup-file = false
script = "build.py"
script = "tools/build.py"
[tool.poetry.dependencies]
python = "^3.10 | ^3.9 | ^3.8 | ^3.7"

View file

@ -274,4 +274,4 @@ async def test_pay_real_invoice(
invoice["payment_hash"], inkey_headers_from["X-Api-Key"]
)
assert type(response) == dict
assert response["paid"] == True
assert response["paid"] is True

View file

@ -45,7 +45,7 @@ is_regtest: bool = not is_fake
docker_bitcoin_rpc = "lnbits"
docker_prefix = "lnbits-legend"
docker_cmd = f"docker exec"
docker_cmd = "docker exec"
docker_lightning = f"{docker_cmd} {docker_prefix}-clightning-2-1"
docker_lightning_cli = f"{docker_lightning} lightning-cli --network regtest"

View file

@ -1,9 +1,10 @@
import glob
import os
import warnings
from pathlib import Path
from typing import List
LNBITS_PATH = os.path.dirname(os.path.realpath(__file__)) + "/lnbits"
LNBITS_PATH = Path("lnbits").absolute()
def get_js_vendored(prefer_minified: bool = False) -> List[str]: