Skip to content

Commit 2b0aff3

Browse files
committed
✨ Implement script
1 parent aafd7b6 commit 2b0aff3

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2+
"version": "0.0.1",
23
"name": "vue3-use-modal",
4+
"license": "MIT",
35
"description": "vue3-use-modal is vue3(vue-next) plugin that provide easy use of modal. It is not only component based but also lets using modal either asynchronous or synchronous behavior.",
46
"keywords": [
57
"modal",
@@ -11,8 +13,6 @@
1113
"usedialog",
1214
"vue3-hooks"
1315
],
14-
"version": "0.0.1",
15-
"license": "MIT",
1616
"homepage": "https://github.com/eddie0329/vue3-use-modal",
1717
"repository": "https://github.com/eddie0329/vue3-use-modal.git",
1818
"author": {

script/npm-publish.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
echo "Current version:" $(grep version ../package.json | sed -E 's/^.*"([0-9][^"]+)".*$/\1/')
2+
3+
read -p "Releasing v$VERSION - are you sure? (y/n)" -n 1 -r
4+
echo # (optional) move to a new line
5+
6+
if [[ $REPLY =~ ^[Yy]$ ]]
7+
then
8+
npm version patch
9+
echo "Releasing version:" $(grep version ../package.json | sed -E 's/^.*"([0-9][^"]+)".*$/\1/')
10+
git push origin v(grep version ../package.json)
11+
fi

0 commit comments

Comments
 (0)