diff --git a/scripts/release.sh b/scripts/release.sh index bf4519c6..62a79cbd 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -113,7 +113,7 @@ NEW_VERSION=$(node -e "console.log(require('$CLI_DIR/package.json').version)") echo " New version: $NEW_VERSION" # Update the version string in cli/src/index.ts -CURRENT_VERSION_IN_SRC=$(grep -oP '\.version\("\K[^"]+' "$CLI_DIR/src/index.ts" || echo "") +CURRENT_VERSION_IN_SRC=$(sed -n 's/.*\.version("\([^"]*\)".*/\1/p' "$CLI_DIR/src/index.ts" | head -1) if [ -n "$CURRENT_VERSION_IN_SRC" ] && [ "$CURRENT_VERSION_IN_SRC" != "$NEW_VERSION" ]; then sed -i '' "s/\.version(\"$CURRENT_VERSION_IN_SRC\")/\.version(\"$NEW_VERSION\")/" "$CLI_DIR/src/index.ts" echo " ✓ Updated cli/src/index.ts version to $NEW_VERSION" diff --git a/server/src/index.ts b/server/src/index.ts index 5cf414da..0d09fa74 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -1,3 +1,4 @@ +/// import { existsSync, readFileSync, rmSync } from "node:fs"; import { createServer } from "node:http"; import { resolve } from "node:path";