diff --git a/Makefile b/Makefile index 02586a05..3ec3ade1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ VERSION=$(shell node -pe 'JSON.parse(require("fs").readFileSync("package.json")).version') +GIT_VERSION=$(shell git describe --long | sed 's/\-g.*//' | sed 's/\-/\./') SLACK_WEBHOOK=$(shell cat ../ogs/.slack-webhook) all dev: @@ -40,8 +41,15 @@ beta: beta_npm upload_to_cdn beta_npm: build publish-beta publish-beta: - make -C engine/ publish-beta - yarn publish --tag beta ./ + 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 ./ && \ + echo "" && \ + echo "" && \ + echo "Published version $(GIT_VERSION)-beta to the beta tag successfully." && \ + echo "" notify: MSG=`git log -1 --pretty="%B" | sed s/\"//g | sed s/\'//g `; \ diff --git a/engine/package.json b/engine/package.json index 1bfea992..216f4c52 100644 --- a/engine/package.json +++ b/engine/package.json @@ -1,6 +1,6 @@ { "name": "goban-engine", - "version": "0.8.1", + "version": "8.3.0-beta", "description": "", "main": "build/goban-engine.js", "types": "build/engine/index.d.ts", diff --git a/package.json b/package.json index 12b7a1b7..7f32a2d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "goban", - "version": "0.8.2-beta.1", + "version": "8.3.0-beta", "description": "", "main": "build/goban.js", "types": "build/src/index.d.ts",