Skip to content

Commit 571975c

Browse files
committed
Address comments.
1 parent b8a2272 commit 571975c

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

build-package.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# exit on any error
4+
set -e
5+
36
. ./pre-check.sh
47

58
tsc

push-package.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
#!/bin/bash
2-
if [[ "${1}x" == "x" ]]; then
3-
echo "Usage: ${0} <version>"
4-
exit 1
5-
fi
2+
3+
# exit on any error
4+
set -e
5+
6+
version=$(cat package.json | jq -r .version)
67

78
. ./pre-check.sh
89

10+
echo "This will tag and publish package version ${version}"
11+
read -p "Confirm [y/N]" confirm
12+
13+
case "${confirm}" in
14+
y|Y ) echo "Tagging and pushing ${version}";;
15+
* ) echo "Aborting"; exit 0;;
16+
esac
17+
918
git tag ${1}
10-
git push upstream ${tag}
19+
git push upstream ${1}
1120

1221
npm publish

0 commit comments

Comments
 (0)