mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-03 23:19:33 +00:00

* Fix definition of workspace package, remove uv pin * add --all-packages * pin docs uv versions for older project structure * try old version to verify CI * Use workflow target * change syntax * change check * try with var in matrix * add all packages to workspace * remove project table
23 lines
642 B
Python
23 lines
642 B
Python
import re
|
|
import sys
|
|
from packaging import version
|
|
|
|
MODULE_REGEX = r"^[a-zA-Z][\-a-zA-Z0-9]+$"
|
|
|
|
package_name = "{{ cookiecutter.package_name }}"
|
|
|
|
at_least_one_error = False
|
|
if not re.match(MODULE_REGEX, package_name):
|
|
print(f'ERROR: "{package_name}" must use kebab case')
|
|
at_least_one_error = True
|
|
|
|
packaging_version = "{{ cookiecutter.version }}"
|
|
|
|
# Check version format using version.VERSION_PATTERN
|
|
if not re.match(version.VERSION_PATTERN, packaging_version, re.VERBOSE | re.IGNORECASE):
|
|
print(f'ERROR: "{packaging_version}" is not a valid version string')
|
|
at_least_one_error = True
|
|
|
|
if at_least_one_error:
|
|
sys.exit(1)
|