Skip to content

Commit

Permalink
Merge pull request #124 from PDOK/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
Shalucik authored Jun 19, 2024
2 parents f47df6b + 7d3844e commit 7fe3071
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-and-publish-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ jobs:
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Autobump version
shell: bash
# language=bash
run: |
set -e
# https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
VERSION=$(echo $GITHUB_REF | grep -oP '(?<=/)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$')
PLACEHOLDER='__version__ = "0.0.0-dev"'
VERSION_FILE='geopackage_validator/__init__.py'
grep "$PLACEHOLDER" "$VERSION_FILE" || { echo 'version placeholder not found'; exit 1; }
sed -i "s/$PLACEHOLDER/__version__ = \"${VERSION}\"/g" "$VERSION_FILE"
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
Expand All @@ -41,6 +52,7 @@ jobs:
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down
12 changes: 6 additions & 6 deletions geopackage_validator/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def gdal_error_handler(err_class, err_num, error):
for t in traceback.format_exception(exc_type, exc_value, exc_traceback)
]
output = format_result(
validation_code=validator.validation_code,
validation_description=f"No unexpected errors must occur for: {validator.__doc__}",
level=validator.level,
validation_code="UNKNOWN_WARNINGS",
validation_description=f"No unexpected errors must occur for: RQ{validator.code} - {validator.__doc__}",
level=ValidationLevel.UNKNOWN_WARNING,
trace=trace,
)
validation_results.append(output)
Expand All @@ -171,9 +171,9 @@ def gdal_error_handler(err_class, err_num, error):
validation_results[-1]["locations"].extend(current_gdal_error_traces)
else:
output = format_result(
validation_code=validator.validation_code,
validation_description=f"No unexpected errors must occur for: {validator.__doc__}",
level=validator.level,
validation_code="UNKNOWN_WARNINGS",
validation_description=f"No unexpected errors must occur for: RQ{validator.code} - {validator.__doc__}",
level=ValidationLevel.UNKNOWN_WARNING,
trace=current_gdal_error_traces,
)
validation_results.append(output)
Expand Down

0 comments on commit 7fe3071

Please sign in to comment.