File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,21 +9,29 @@ info() {
99 echo " $( date ' +[%Y-%m-%d %H:%M:%S]' ) ${PROG} : INFO: $* "
1010}
1111
12- # Prints an error to stderr, and exits.
1312error () {
1413 echo " $( date ' +[%Y-%m-%d %H:%M:%S]' ) ${PROG} ERROR: $* " >&2
1514 exit 1
1615}
1716
17+ check_uncommitted_changes () {
18+ if ! git diff-index --quiet HEAD --; then
19+ error " There are uncommitted changes in the working directory."
20+ fi
21+ }
22+
1823main () {
1924 local current_version
2025 current_version=$( cat package.json | jq -r .version)
21- info " releasing ${current_version} "
26+ info " Releasing ${current_version} "
27+
2228 yarn version --new-version " ${current_version} "
2329 yarn clean
30+ yarn install
31+ check_uncommitted_changes
2432 yarn dist
2533 local next_version
26- info " release version: ${current_version} , next version:"
34+ info " Release version: ${current_version} , next version:"
2735 read next_version
2836 yarn version --no-git-tag-version --new-version " ${next_version} "
2937 git add package.json
You can’t perform that action at this time.
0 commit comments