From b73d245abef11f7f42a06c4100089e5a838cc15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 17:24:59 +0200 Subject: [PATCH 01/12] =?UTF-8?q?=F0=9F=92=9A=20Fix=20Poetry=20install=20i?= =?UTF-8?q?n=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 8 ++++++-- .github/workflows/publish.yml | 8 ++++++-- .github/workflows/test.yml | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 3559874643..10b8a80ae6 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -23,10 +23,14 @@ jobs: key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' + # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + # once there's a release of Poetry 1.2.x including poetry-core > 1.1.0a6 + # Ref: https://github.com/python-poetry/poetry-core/pull/188 run: | python -m pip install --upgrade pip - python -m pip install "poetry>=1.2.0a1" - python -m poetry plugin add poetry-version-plugin + python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + python -m pip install "poetry==1.2.0a2" + python -m poetry plugin add poetry-version-plugin - name: Configure poetry run: python -m poetry config virtualenvs.in-project true - name: Ensure cache is healthy diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c75ecc0514..6ca92bec1e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,10 +21,14 @@ jobs: key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' + # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + # once there's a release of Poetry 1.2.x including poetry-core > 1.1.0a6 + # Ref: https://github.com/python-poetry/poetry-core/pull/188 run: | python -m pip install --upgrade pip - python -m pip install "poetry>=1.2.0a1" - python -m poetry plugin add poetry-version-plugin + python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + python -m pip install "poetry==1.2.0a2" + python -m poetry plugin add poetry-version-plugin - name: Configure poetry run: python -m poetry config virtualenvs.in-project true - name: Ensure cache is healthy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aa60d7faf0..746b5cb99b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,10 +26,14 @@ jobs: key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' + # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + # once there's a release of Poetry 1.2.x including poetry-core > 1.1.0a6 + # Ref: https://github.com/python-poetry/poetry-core/pull/188 run: | python -m pip install --upgrade pip - python -m pip install "poetry>=1.2.0a1" - python -m poetry plugin add poetry-version-plugin + python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 + python -m pip install "poetry==1.2.0a2" + python -m poetry plugin add poetry-version-plugin - name: Configure poetry run: python -m poetry config virtualenvs.in-project true - name: Ensure cache is healthy From 53c99eea3c1c2c9124128bd9579913517e73549c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 17:34:30 +0200 Subject: [PATCH 02/12] =?UTF-8?q?=F0=9F=92=9A=20Fix=20coverage=20report=20?= =?UTF-8?q?and=20add=20lint=20to=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 4 +++- scripts/test.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 746b5cb99b..1b21e81580 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,9 @@ jobs: - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: python -m poetry install + - name: Lint + run: python -m poetry run bash scripts/lint.sh - name: Test - run: bash scripts/test.sh + run: python -m poetry run bash scripts/test.sh - name: Upload coverage uses: codecov/codecov-action@v1 diff --git a/scripts/test.sh b/scripts/test.sh index 139c1fb1c0..7fce865bd6 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -6,3 +6,4 @@ set -x coverage run -m pytest tests coverage combine coverage report --show-missing +coverage xml From 5badd61b0bc3dc7956ff5a9c2fa0768fbdd8db78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 17:58:28 +0200 Subject: [PATCH 03/12] =?UTF-8?q?=F0=9F=8E=A8=20Fix=20type=20annotations?= =?UTF-8?q?=20for=20Session.get?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlmodel/orm/session.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlmodel/orm/session.py b/sqlmodel/orm/session.py index a96544e9ef..d708f1e7e9 100644 --- a/sqlmodel/orm/session.py +++ b/sqlmodel/orm/session.py @@ -1,4 +1,4 @@ -from typing import Any, Mapping, Optional, Sequence, TypeVar, Union, overload +from typing import Any, Mapping, Optional, Sequence, Type, TypeVar, Union, overload from sqlalchemy import util from sqlalchemy.orm import Query as _Query @@ -118,13 +118,13 @@ def query(self, *entities: Any, **kwargs: Any) -> "_Query[Any]": def get( self, - entity: _T, + entity: Type[_T], ident: Any, options: Optional[Sequence[Any]] = None, populate_existing: bool = False, with_for_update: Optional[Union[Literal[True], Mapping[str, Any]]] = None, identity_token: Optional[Any] = None, - ) -> _T: + ) -> Optional[_T]: return super().get( entity, ident, From 2147d8477199ce76dd370506e35f48064434c093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 17:59:29 +0200 Subject: [PATCH 04/12] =?UTF-8?q?=E2=9E=95=20Add=20isort=20to=20dev=20depe?= =?UTF-8?q?ndencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c4599b5f0d..3cc251c689 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,7 @@ coverage = {extras = ["toml"], version = "^5.5"} fastapi = "^0.68.0" requests = "^2.26.0" autoflake = "^1.4" +isort = "^5.9.3" [build-system] requires = ["poetry-core"] From bc2c864399cc159b001862b5bf31dd1f380cb3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 18:49:18 +0200 Subject: [PATCH 05/12] =?UTF-8?q?=F0=9F=8E=A8=20Add=20type=20annotations?= =?UTF-8?q?=20required=20for=20Python=203.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlmodel/sql/expression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlmodel/sql/expression.py b/sqlmodel/sql/expression.py index e8a922e4d3..66063bf236 100644 --- a/sqlmodel/sql/expression.py +++ b/sqlmodel/sql/expression.py @@ -45,10 +45,10 @@ class SelectOfScalar(_Select, Generic[_TSelect]): class GenericSelectMeta(GenericMeta, _Select.__class__): # type: ignore pass - class _Py36Select(_Select, Generic[_TSelect], metaclass=GenericSelectMeta): + class _Py36Select(_Select, Generic[_TSelect], metaclass=GenericSelectMeta): # type: ignore pass - class _Py36SelectOfScalar(_Select, Generic[_TSelect], metaclass=GenericSelectMeta): + class _Py36SelectOfScalar(_Select, Generic[_TSelect], metaclass=GenericSelectMeta): # type: ignore pass # Cast them for editors to work correctly, from several tricks tried, this works From 35e8843736e7fad2540d783a8659bb9078a4cc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 18:49:57 +0200 Subject: [PATCH 06/12] =?UTF-8?q?=F0=9F=90=9B=20Fix=20ForwardRef=20handlin?= =?UTF-8?q?g=20for=20Python=203.6,=20re-use=20from=20Pydantic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlmodel/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sqlmodel/main.py b/sqlmodel/main.py index dd38dd2b80..661276b31d 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -12,7 +12,6 @@ Callable, ClassVar, Dict, - ForwardRef, List, Mapping, Optional, @@ -30,7 +29,7 @@ from pydantic.fields import FieldInfo as PydanticFieldInfo from pydantic.fields import ModelField, Undefined, UndefinedType from pydantic.main import BaseConfig, ModelMetaclass, validate_model -from pydantic.typing import NoArgAnyCallable, resolve_annotations +from pydantic.typing import ForwardRef, NoArgAnyCallable, resolve_annotations from pydantic.utils import ROOT_KEY, Representation from sqlalchemy import ( Boolean, @@ -343,7 +342,7 @@ def __init__( ) relationship_to = temp_field.type_ if isinstance(temp_field.type_, ForwardRef): - relationship_to = temp_field.type_.__forward_arg__ + relationship_to = temp_field.type_.__forward_arg__ # type: ignore rel_kwargs: Dict[str, Any] = {} if rel_info.back_populates: rel_kwargs["back_populates"] = rel_info.back_populates From bc332a931bd302948023a71141456169e48cad11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 19:19:05 +0200 Subject: [PATCH 07/12] =?UTF-8?q?=E2=9E=95=20Add=20development=20dependenc?= =?UTF-8?q?ies=20for=20Python=203.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 3cc251c689..e4d7a0ec14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,8 @@ fastapi = "^0.68.0" requests = "^2.26.0" autoflake = "^1.4" isort = "^5.9.3" +async_generator = {version = "*", python = "~3.6"} +async-exit-stack = {version = "*", python = "~3.6"} [build-system] requires = ["poetry-core"] From 5fb9638e9c2ad7f1972ce135db1e3a8615e2e3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 19:26:36 +0200 Subject: [PATCH 08/12] =?UTF-8?q?=F0=9F=92=9A=20Do=20not=20lint=20in=20Pyt?= =?UTF-8?q?hon=203.6=20as=20Black=20requires=20>=203.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b21e81580..98f84f4af8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,7 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: python -m poetry install - name: Lint + if: ${{ matrix.python-version != '3.6' }} run: python -m poetry run bash scripts/lint.sh - name: Test run: python -m poetry run bash scripts/test.sh From a2b33b37f3ca49cb89875688169423d6d17e1ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 19:41:04 +0200 Subject: [PATCH 09/12] =?UTF-8?q?=F0=9F=92=9A=20Use=20the=20same=20pip=20i?= =?UTF-8?q?nvocation=20to=20call=20MkDocs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 10b8a80ae6..3e7255d626 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -43,7 +43,7 @@ jobs: if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true' run: pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git - name: Build Docs - run: python3.7 -m mkdocs build + run: python -m mkdocs build - name: Zip docs run: bash ./scripts/zip-docs.sh - uses: actions/upload-artifact@v2 From 897273d87cb21a4e61b178ad9e411e9144003dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 19:44:39 +0200 Subject: [PATCH 10/12] =?UTF-8?q?=F0=9F=94=8A=20Add=20temporary=20Tmate=20?= =?UTF-8?q?for=20debugging=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 3e7255d626..c76aedc692 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -42,6 +42,12 @@ jobs: - name: Install Material for MkDocs Insiders if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true' run: pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true + - name: Build Docs run: python -m mkdocs build - name: Zip docs From 824ace5fd3555d19a19e1dc99d329d198fa54167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 20:06:13 +0200 Subject: [PATCH 11/12] =?UTF-8?q?=F0=9F=92=9A=20Update=20CI=20configs,=20c?= =?UTF-8?q?aching=20and=20Poetry=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 31 +++++++++++++++++-------------- .github/workflows/publish.yml | 19 ++++++++++++++----- .github/workflows/test.yml | 19 ++++++++++++++----- 3 files changed, 45 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index c76aedc692..82402f537a 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -3,6 +3,12 @@ on: push: pull_request: types: [opened, synchronize] + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: build-docs: runs-on: ubuntu-20.04 @@ -16,11 +22,17 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.7" + # Allow debugging with tmate + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - uses: actions/cache@v2 id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root-docs - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 @@ -32,26 +44,17 @@ jobs: python -m pip install "poetry==1.2.0a2" python -m poetry plugin add poetry-version-plugin - name: Configure poetry - run: python -m poetry config virtualenvs.in-project true - - name: Ensure cache is healthy - if: steps.cache.outputs.cache-hit == 'true' - run: python -m poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + run: python -m poetry config virtualenvs.create false - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: python -m poetry install - name: Install Material for MkDocs Insiders if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true' - run: pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git - - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - + run: python -m poetry run pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git - name: Build Docs - run: python -m mkdocs build + run: python -m poetry run mkdocs build - name: Zip docs - run: bash ./scripts/zip-docs.sh + run: python -m poetry run bash ./scripts/zip-docs.sh - uses: actions/upload-artifact@v2 with: name: docs-zip diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6ca92bec1e..105dbdd4cc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,6 +4,12 @@ on: release: types: - created + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: publish: @@ -14,11 +20,17 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.7" + # Allow debugging with tmate + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - uses: actions/cache@v2 id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 @@ -30,10 +42,7 @@ jobs: python -m pip install "poetry==1.2.0a2" python -m poetry plugin add poetry-version-plugin - name: Configure poetry - run: python -m poetry config virtualenvs.in-project true - - name: Ensure cache is healthy - if: steps.cache.outputs.cache-hit == 'true' - run: python -m poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + run: python -m poetry config virtualenvs.create false - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: python -m poetry install diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 98f84f4af8..6e15a7d6f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,12 @@ on: push: pull_request: types: [opened, synchronize] + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: test: @@ -19,11 +25,17 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + # Allow debugging with tmate + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - uses: actions/cache@v2 id: cache with: path: ${{ env.pythonLocation }} - key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-root - name: Install poetry if: steps.cache.outputs.cache-hit != 'true' # TODO: remove python -m pip install --force git+https://github.com/python-poetry/poetry-core.git@ad33bc2 @@ -35,10 +47,7 @@ jobs: python -m pip install "poetry==1.2.0a2" python -m poetry plugin add poetry-version-plugin - name: Configure poetry - run: python -m poetry config virtualenvs.in-project true - - name: Ensure cache is healthy - if: steps.cache.outputs.cache-hit == 'true' - run: python -m poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + run: python -m poetry config virtualenvs.create false - name: Install Dependencies if: steps.cache.outputs.cache-hit != 'true' run: python -m poetry install From 4a5cda845dfddb792bda23c0a477e7917a64d30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 20:10:09 +0200 Subject: [PATCH 12/12] =?UTF-8?q?=F0=9F=92=9A=20Add=20zip=20docs=20utility?= =?UTF-8?q?=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/zip-docs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/zip-docs.sh diff --git a/scripts/zip-docs.sh b/scripts/zip-docs.sh new file mode 100644 index 0000000000..f2b7ba3be3 --- /dev/null +++ b/scripts/zip-docs.sh @@ -0,0 +1,9 @@ +#! /usr/bin/env bash + +set -x +set -e + +if [ -f docs.zip ]; then + rm -rf docs.zip +fi +zip -r docs.zip ./site