Skip to content

Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.

Fixed publish.sh to avoid "-bash: [: '0.4.12': binary operator expected" error

Jan Curn222c55920f93
diff --git a/publish.sh b/publish.sh
index 824e31cac..0fac3fb5d 100755
--- a/publish.sh
+++ b/publish.sh
@@ -21,7 +21,8 @@ git push
# Master gets published as LATEST if that version doesn't exists yet and retagged as LATEST otherwise.
if [ "${BRANCH}" = "master" ]; then
- if [ -z `npm view ${PACKAGE_NAME} versions | grep ${PACKAGE_VERSION}` ]; then
+ EXISTING_NPM_VERSION=$(npm view ${PACKAGE_NAME} versions | grep ${PACKAGE_VERSION})
+ if [ -z "${EXISTING_NPM_VERSION}" ]; then
printf "${RED}You can only publish to NPM from develop branch with beta tag!${NC}\n"
exit 1
else