Skip to content

Commit

Permalink
Peg deployment versions to git tags and commit numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Jun 25, 2024
1 parent 6d3aa50 commit 76a8563
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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 `; \
Expand Down
2 changes: 1 addition & 1 deletion engine/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 76a8563

Please sign in to comment.