diff --git a/Makefile b/Makefile index 3ec3ade1..a48f975b 100644 --- a/Makefile +++ b/Makefile @@ -34,31 +34,39 @@ publish_docs: typedoc clean: rm -Rf lib node build engine/build -publish push: publish_npm publish_docs upload_to_cdn notify +publish push: publish-production publish_docs upload_to_cdn notify beta: beta_npm upload_to_cdn beta_npm: build publish-beta -publish-beta: +publish-beta: build sed -i'.tmp' "s/\"version\": .*/\"version\": \"$(GIT_VERSION)-beta\",/" package.json sed -i'.tmp' "s/\"version\": .*/\"version\": \"$(GIT_VERSION)-beta\",/" engine/package.json - @read -p "Publishing version $(GIT_VERSION) to the beta tag. Enter OTP :" otp; \ - npm publish --dry-run --tag beta --otp $$otp engine/ && \ - npm publish --dry-run --tag beta --otp $$otp ./ && \ + @read -p "Publishing version $(GIT_VERSION) to the beta tag. Enter OTP : " otp; \ + npm publish --tag beta --otp $$otp engine/ && \ + npm publish --tag beta --otp $$otp ./ && \ echo "" && \ echo "" && \ echo "Published version $(GIT_VERSION)-beta to the beta tag successfully." && \ echo "" +publish-production: build + sed -i'.tmp' "s/\"version\": .*/\"version\": \"$(GIT_VERSION)\",/" package.json + sed -i'.tmp' "s/\"version\": .*/\"version\": \"$(GIT_VERSION)\",/" engine/package.json + @read -p "Publishing version $(GIT_VERSION). Enter OTP : " otp; \ + npm publish --otp $$otp engine/ && \ + npm publish --otp $$otp ./ && \ + echo "" && \ + echo "" && \ + echo "Published version $(GIT_VERSION) successfully." && \ + echo "" + notify: MSG=`git log -1 --pretty="%B" | sed s/\"//g | sed s/\'//g `; \ VERSION=`git describe --long`; \ curl -X POST -H 'Content-type: application/json' --data '{"text":"'"[GOBAN] $$VERSION $$MSG"'"}' $(SLACK_WEBHOOK) -publish_npm: build - make -C engine/ publish - yarn publish ./ upload_to_cdn: rm -Rf deployment-staging-area; @@ -67,5 +75,5 @@ upload_to_cdn: cp lib/goban.min.js* deployment-staging-area gsutil -m rsync -r deployment-staging-area/ gs://ogs-site-files/goban/`node -pe 'JSON.parse(require("fs").readFileSync("package.json")).version'`/ -.PHONY: doc build docs test clean all dev typedoc publish push lib publish_npm upload_to_cdn notify beta beta_npm publish-beta publish_docs build-debug build-production detect-duplicate-code duplicate-code-detection lint +.PHONY: doc build docs test clean all dev typedoc publish push lib publish-production upload_to_cdn notify beta beta_npm publish-beta publish_docs build-debug build-production detect-duplicate-code duplicate-code-detection lint diff --git a/engine/package.json b/engine/package.json index 216f4c52..c9c8e1ab 100644 --- a/engine/package.json +++ b/engine/package.json @@ -1,6 +1,6 @@ { "name": "goban-engine", - "version": "8.3.0-beta", + "version": "8.3.1-beta", "description": "", "main": "build/goban-engine.js", "types": "build/engine/index.d.ts", diff --git a/package.json b/package.json index 7f32a2d1..e20b0365 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "goban", - "version": "8.3.0-beta", + "version": "8.3.1-beta", "description": "", "main": "build/goban.js", "types": "build/src/index.d.ts",