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)"
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||||
cd "$HERE"
|
cd "$HERE"
|
||||||
|
|
||||||
VERSION="$(grep -oP '__version__\s*=\s*"\K[^"]+' repoman.py)"
|
VERSION="$(sed -n 's/^__version__[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' repoman.py | head -n1)"
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
echo "[build] no se pudo leer __version__ de repoman.py" >&2
|
echo "[build] no se pudo leer __version__ de repoman.py" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user