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",