File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Checking if current tag matches the package version
4+ current_tag=$( echo $GITHUB_REF | cut -d ' /' -f 3 | sed -r ' s/^v//' )
5+ file_tag=$( grep ' __version__ =' meilisearch/version.py | cut -d ' =' -f 2- | tr -d ' ' | tr -d ' "' | tr -d ' ,' )
6+ if [ " $current_tag " != " $file_tag " ]; then
7+ echo " Error: the current tag does not match the version in package file(s)."
8+ echo " $current_tag vs $file_tag "
9+ exit 1
10+ fi
11+
12+ echo ' OK'
13+ exit 0
Original file line number Diff line number Diff line change 1313 - name : Set up Docker Buildx
1414 uses : docker/setup-buildx-action@v2
1515
16+ - name : Check release validity
17+ run : sh .github/scripts/check-release.sh
18+
1619 - name : Set up QEMU
1720 uses : docker/setup-qemu-action@v2
1821
Original file line number Diff line number Diff line change 1010import os
1111import copy
1212
13+ from .version import qualified_version
1314from .config_validator import ConfigValidator
1415from .urls_parser import UrlsParser
1516from .selectors_parser import SelectorsParser
@@ -44,7 +45,7 @@ class ConfigLoader:
4445 strict_redirect = True
4546 strip_chars = ".,;:§¶"
4647 use_anchors = False
47- user_agent = 'Meilisearch docs-scraper'
48+ user_agent = qualified_version ()
4849 only_content_level = False
4950 query_rules = []
5051
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
3+ __version__ = "0.12.9"
4+
5+
6+ def qualified_version () -> str :
7+ """Get the qualified version of this module."""
8+
9+ return f"Meilisearch Docs-scraper (v{ __version__ } )"
You can’t perform that action at this time.
0 commit comments