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.

Updated publish.sh, bumped package.json version

Jan Curn843504f62b04
diff --git a/package.json b/package.json
index 58dc25893..d8e859345 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "apify",
- "version": "0.4.11",
+ "version": "0.4.12",
"description": "Apify runtime for JavaScript",
"main": "build/index.js",
"keywords": [
diff --git a/publish.sh b/publish.sh
index 5a604a0da..824e31cac 100755
--- a/publish.sh
+++ b/publish.sh
@@ -11,8 +11,8 @@ BRANCH=`git status | grep 'On branch' | cut -d ' ' -f 3`
BRANCH_UP_TO_DATE=`git status | grep 'nothing to commit' | tr -s \n ' '`;
GIT_TAG="v${PACKAGE_VERSION}"
-if [ -z "$BRANCH_UP_TO_DATE" ]; then
- printf "${RED}You have uncommited changes!${NC}\n"
+if [ -z "${BRANCH_UP_TO_DATE}" ]; then
+ printf "${RED}You have uncommitted changes!${NC}\n"
exit 1
fi
@@ -20,17 +20,17 @@ echo "Pushing to git ..."
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
- echo "Publishing version ${PACKAGE_VERSION} with tag \"latest\" ..."
- RUNNING_FROM_SCRIPT=1 npm publish --tag latest
+if [ "${BRANCH}" = "master" ]; then
+ if [ -z `npm view ${PACKAGE_NAME} versions | grep ${PACKAGE_VERSION}` ]; then
+ printf "${RED}You can only publish to NPM from develop branch with beta tag!${NC}\n"
+ exit 1
else
echo "Tagging version ${PACKAGE_VERSION} with tag \"latest\" ..."
RUNNING_FROM_SCRIPT=1 npm dist-tag add ${PACKAGE_NAME}@${PACKAGE_VERSION} latest
fi
# Develop branch gets published as BETA and we don't allow to override tag of existing version.
-elif [ $BRANCH = "develop" ]; then
+elif [ "${BRANCH}" = "develop" ]; then
echo "Publishing version ${PACKAGE_VERSION} with tag \"beta\" ..."
RUNNING_FROM_SCRIPT=1 npm publish --tag beta