diff --git a/pyproject.toml b/pyproject.toml index e8e8390..bc462bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,10 +42,10 @@ tests = "pytest -vv tests" detached = true [tool.hatch.envs.dc.scripts] -build = "mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*'" +build = "mkdir -p dist && rm -rf dist/custom_component.zip && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*'" push = "curl --request POST --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\" --form 'file=@dist/custom_component.zip;type=application/zip'" -build-and-push = "mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\" --form 'file=@dist/custom_component.zip;type=application/zip'" -build-and-push-with-linting = "hatch run code-quality:all && mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\" --form 'file=@dist/custom_component.zip;type=application/zip'" +build-and-push = "mkdir -p dist && rm -f dist/custom_component.zip && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\" --form 'file=@dist/custom_component.zip;type=application/zip'" +build-and-push-with-linting = "hatch run code-quality:all && mkdir -p dist && rm -f dist/custom_component.zip && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\" --form 'file=@dist/custom_component.zip;type=application/zip'" list = "curl --request GET --url ${{API_URL:-https://api.cloud.deepset.ai}}/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer ${{API_KEY}}\"" build-windows = "powershell -Command \"& {{ if (-Not (Test-Path dist)) {{mkdir dist}}; if (Test-Path dist/custom_component.zip) {{ Remove-Item dist/custom_component.zip }}; Get-ChildItem -Path . | Where-Object {{ $_.FullName -notlike '*\\dist*' }} | Compress-Archive -DestinationPath dist/custom_component.zip -Update }}\"" push-windows = [