Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

build: change space replacement when set version to fix client upgrade always problem (#5554)

Joooye_34dd671c8764b3
diff --git a/scripts/set-version.sh b/scripts/set-version.sh
index a303e51c68..389c2ee74f 100755
--- a/scripts/set-version.sh
+++ b/scripts/set-version.sh
@@ -1,10 +1,12 @@
#!/bin/bash
for DIR_ITEM in $(yarn workspaces list --json | jq -r '.location'); do
- DIR=$(echo -n "$DIR_ITEM" | sed -e 's/[[:blank:]]*$//' -e 's/[\n\r]*$//')
+ DIR=$(echo -n "$DIR_ITEM" | tr -d '\r\n')
if [ -f "$DIR/package.json" ]; then
echo "Setting version for $DIR"
jq ".version = \"$1\"" "$DIR"/package.json > tmp.json && mv tmp.json "$DIR"/package.json
+ else
+ echo "No package.json found in: $DIR"
fi
done