Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d32ee55

Browse files
committed
git-commit during version bumping automatically
This is currently broken because npm will not automatically commit/tag if the package is not at the repo root. This project is using lerna, but we don't need lerna since we're only modifying a single subpackage. So instead, we hook into the version lifecycle event to do the git committing ourselves. (But no tagging; there are still multiple packages in this repo after all.)
1 parent dfdc522 commit d32ee55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/optimizely-sdk/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"lint": "eslint 'lib/**/*.js'",
2121
"cover": "istanbul cover _mocha ./lib/*.tests.js ./lib/**/*.tests.js ./lib/**/**/*tests.js",
2222
"coveralls": "npm run cover -- --report lcovonly && cat ./coverage/lcov.info | coveralls",
23-
"prepare": "npm run build-browser-esm"
23+
"prepare": "npm run build-browser-esm",
24+
"postversion": "git commit -m v$npm_package_version -- package*.json"
2425
},
2526
"repository": {
2627
"type": "git",

0 commit comments

Comments
 (0)