squash-only 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,10 +9,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
9
9
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
10
10
|
|
|
11
11
|
# Extract version from package.json
|
|
12
|
-
|
|
13
|
-
# macOS uses BSD sed which doesn't support \s, while GNU sed (Linux) does.
|
|
14
|
-
# [[:space:]] works on both BSD and GNU sed.
|
|
15
|
-
VERSION=$(sed -n 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' "$PROJECT_ROOT/package.json" | head -1)
|
|
12
|
+
VERSION=$(jq -r '.version' "$PROJECT_ROOT/package.json")
|
|
16
13
|
|
|
17
14
|
if [ -z "$VERSION" ]; then
|
|
18
15
|
echo "Error: Could not extract version from package.json" >&2
|