File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # exit on any error
4
+ set -e
5
+
6
+ . ./pre-check.sh
7
+
3
8
tsc
4
9
npm pack
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ branch=$( git rev-parse --abbrev-ref HEAD)
4
+
5
+ if [[ " ${branch} " != " master" ]]; then
6
+ echo " This script can only be run on the master branch. Current branch is ${branch} "
7
+ exit 1
8
+ fi
9
+
10
+ if ! git diff --quiet; then
11
+ echo " This script must only run on a clean master branch."
12
+ echo
13
+ git status
14
+ exit 1
15
+ fi
16
+
17
+ untracked=$( git ls-files --exclude-standard --others)
18
+
19
+ if [[ " ${untracked} " != " " ]]; then
20
+ echo " This script requires no untracked files."
21
+ echo
22
+ git status
23
+ exit 1
24
+ fi
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # exit on any error
4
+ set -e
5
+
6
+ version=$( cat package.json | jq -r .version)
7
+
8
+ . ./pre-check.sh
9
+
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
+
18
+ git tag ${1}
19
+ git push upstream ${1}
20
+
3
21
npm publish
You can’t perform that action at this time.
0 commit comments