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

Commit 3836ec0

Browse files
committed
[build] Workaround NPM subdirectory version issue
npm/cli#2010
1 parent 0c71da6 commit 3836ec0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/bin/release-dev

+6
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@ git checkout origin/master
1414
# eliminating it would require manually generating the version.
1515
npm version prerelease --preid="$PRE_ID" -m '[release] %s'
1616

17+
# https://github.com/npm/cli/issues/2010
18+
version="$(sed -rn '/"version"/ { s%.*"([^"]+)".*%\1%p; q }' package.json)"
19+
git add package.json
20+
git commit -m "[release] v${version}"
21+
git tag "v$version"
22+
1723
# Point the next tag to this release.
1824
npm publish --tag next

0 commit comments

Comments
 (0)