mirror of
https://github.com/FuzzingLabs/fuzzforge_ai.git
synced 2026-03-14 04:46:14 +00:00
Split module image build into build-modules-sdk and build-modules-images; build-modules now depends on both. Factor container engine detection and version parsing into scripts/container-env.sh and scripts/pyproject-version.sh respectively. Add Makefile variables for SDK/module paths and image naming, update help output, and simplify clean target to remove common caches and .pyc files.
13 lines
441 B
Bash
Executable File
13 lines
441 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Extract the version from a pyproject.toml file.
|
|
# Usage: pyproject-version.sh <path/to/pyproject.toml> [default]
|
|
# Prints the version string, or the default (0.0.1) if not found.
|
|
|
|
PYPROJECT="${1:?Usage: pyproject-version.sh <pyproject.toml> [default]}"
|
|
DEFAULT="${2:-0.0.1}"
|
|
|
|
version=$(grep -m1 '^version\s*=' "${PYPROJECT}" 2>/dev/null \
|
|
| sed 's/^version\s*=\s*//;s/"//g;s/\s*$//')
|
|
|
|
echo "${version:-${DEFAULT}}"
|