Skip to content

Commit 274ce4a

Browse files
authored
Update version.sh
1 parent 61bcd1b commit 274ce4a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

client/version.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
LERNA_FILE="../lerna.json"
55

66
# Check if lerna.json exists
7-
if [ ! -f "$LERNA_FILE" ]; then
8-
echo "Error: $LERNA_FILE does not exist."
7+
if [ ! -f "${LERNA_FILE}" ]; then
8+
echo "Error: ${LERNA_FILE} does not exist."
9+
exit 1
10+
fi
11+
12+
# Check if we have write permissions to the destination directory
13+
if [ ! -w "src/lib" ]; then
14+
echo "Error: No write permission to src/lib directory."
915
exit 1
1016
fi
1117

@@ -22,4 +28,4 @@ fi
2228
echo "{\"version\": \"$VERSION\"}" > src/lib/info.json
2329

2430
# Confirm success
25-
echo "info.json created with version: $VERSION"
31+
echo "info.json created with version: $VERSION"

0 commit comments

Comments
 (0)