build.sh: extracció de versió portable amb sed (compatible macOS)
This commit is contained in:
@@ -6,7 +6,7 @@ set -euo pipefail
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
cd "$HERE"
|
||||
|
||||
VERSION="$(grep -oP '__version__\s*=\s*"\K[^"]+' gitswarm.py)"
|
||||
VERSION="$(sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' gitswarm.py | head -n1)"
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "[build] no se pudo leer __version__ de gitswarm.py" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user