diff --git a/.drone.yml b/.drone.yml index 094db62..cc05597 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,7 +25,7 @@ steps: - VERSION=$(grep -E '^version\s*=' pyproject.toml | head -1 | cut -d'"' -f2) - echo "🔍 Checking if $PACKAGE_NAME==$VERSION exists on $PIP_REPO_URL ..." - | - if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then + if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then echo "✅ $PACKAGE_NAME==$VERSION already exists — skipping build." exit 78 else @@ -45,11 +45,12 @@ steps: - pip install --upgrade pip build - | AUTH_URL="https://${PIP_USERNAME}:${PIP_PASSWORD}@$(echo "${PIP_REPO_URL#*://}" | sed 's:/*$::')/simple" - pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]" + pip install --index-url "$AUTH_URL" --extra-index-url https://pypi.org/simple/ -U ".[dev]" "pydoclint>=0.9.1" - echo "🛡️ Running quality gate..." - python -m black --check . - python -m ruff check . - python -m mypy + - pydoclint . - python -m pytest - name: build-package @@ -125,7 +126,7 @@ steps: echo "🔁 Version: $VERSION" if curl -fsSL -u "$PIP_USERNAME:$PIP_PASSWORD" \ - "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -q "$VERSION"; then + "$PIP_REPO_URL/simple/$PACKAGE_NAME/" | grep -qE "${PACKAGE_NAME}-${VERSION}(-|\.tar\.gz|\.whl)"; then echo "⏭️ Exists, skipping" continue fi @@ -146,4 +147,4 @@ steps: trigger: event: - - custom \ No newline at end of file + - custom