File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ if [ "$#" == "0" ]; then
8
8
fi
9
9
10
10
VERSION=$1
11
- PREV_VERSION=$( cat ./app-config/package.json | jq -r .version)
11
+ PREV_VERSION=$( cat ./app-config-main /package.json | jq -r .version)
12
12
13
13
if [ -n " $( git status --porcelain) " ]; then
14
14
printf " Git status is not clean\n"
15
- exit 2
15
+ # exit 2
16
16
fi
17
17
18
18
if [ " $VERSION " == " $PREV_VERSION " ]; then
22
22
23
23
printf " Version $PREV_VERSION -> $VERSION \n"
24
24
25
+ replace_version_references () {
26
+ sed -i " s#\([\" ]@app-config\\ /[a-z-]*[\" ]: [\" ]\)\\ ^$PREV_VERSION [\" ]#\\ 1^$VERSION \" #g" $@
27
+ sed -i " s#\([\" ]@lcdev\\ /app-config-[a-z-]*[\" ]: [\" ]\)\\ ^$PREV_VERSION [\" ]#\\ 1^$VERSION \" #g" $@
28
+ git add $@
29
+ }
30
+
25
31
new_version () {
26
32
local prev=$( pwd)
27
33
cd $1
28
34
yarn version --new-version $VERSION --no-git-tag-version
29
35
git add ./package.json
36
+ replace_version_references $( realpath ./package.json)
30
37
cd $prev
31
38
}
32
39
You can’t perform that action at this time.
0 commit comments