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 13
13
- name : Set up Docker Buildx
14
14
uses : docker/setup-buildx-action@v2
15
15
16
+ - name : Check release validity
17
+ run : sh .github/scripts/check-release.sh
18
+
16
19
- name : Set up QEMU
17
20
uses : docker/setup-qemu-action@v2
18
21
Original file line number Diff line number Diff line change 10
10
import os
11
11
import copy
12
12
13
+ from .version import qualified_version
13
14
from .config_validator import ConfigValidator
14
15
from .urls_parser import UrlsParser
15
16
from .selectors_parser import SelectorsParser
@@ -44,7 +45,7 @@ class ConfigLoader:
44
45
strict_redirect = True
45
46
strip_chars = ".,;:§¶"
46
47
use_anchors = False
47
- user_agent = 'Meilisearch docs-scraper'
48
+ user_agent = qualified_version ()
48
49
only_content_level = False
49
50
query_rules = []
50
51
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