-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·43 lines (34 loc) · 971 Bytes
/
test.sh
File metadata and controls
executable file
·43 lines (34 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Copyright 2017-2019 @polkadot/dev authors & contributors
# This software may be modified and distributed under the terms
# of the Apache-2.0 license. See the LICENSE file for details.
function lerna_get_version () {
LERNA_VERSION=$(cat lerna.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
}
function lerna_bump () {
echo ""
echo "*** Incrementing lerna version"
lerna_get_version
LERNA_VERSION_PRE="$LERNA_VERSION"
BETA=${LERNA_VERSION_PRE##*-}
if [[ $BETA == *"beta"* ]]; then
yarn run plugnet-dev-version-beta
else
LAST=${BETA##*.}
if [[ $LAST == "0" ]]; then
yarn run plugnet-dev-version-patch
else
yarn run lerna version preminor --preid beta --yes --no-git-tag-version --no-push --allow-branch '*'
fi
fi
git add --all .
lerna_get_version
LERNA_VERSION_POST="$LERNA_VERSION"
echo ""
echo "*** Lerna increment completed"
}
lerna_bump