From 828ae9eadef1cfc20cc99509283f758421802eb6 Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Wed, 9 Nov 2022 21:40:16 +0100 Subject: [PATCH] Improve release management script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a24f005..560edb9 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "link": "npm install --no-save file:///$PWD/", "build": "rimraf ./dist && tsc", "prepublishOnly": "npm run lint && npm run build", - "release": "release() { test \"$1\" && npm version $1 && npm publish && git push origin develop && git push origin --tags; }; release" + "release": "release() { test \"$1\" && test `git rev-parse --abbrev-ref HEAD` == \"develop\" && git pull origin develop --rebase && npm version $1 && npm publish && git push origin develop && git push origin --tags; }; release" }, "keywords": [ "homebridge-plugin",