File tree 4 files changed +30
-3
lines changed
4 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " valyou" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.1.0 " ,
4
4
"scripts" : {
5
5
"ng" : " ng" ,
6
6
"start" : " ng serve" ,
7
7
"build" : " ng build" ,
8
8
"test" : " ng test" ,
9
9
"lint" : " ng lint" ,
10
- "e2e" : " ng e2e"
10
+ "e2e" : " ng e2e" ,
11
+ "change-version" : " bash ./version-manager.sh"
11
12
},
12
13
"private" : true ,
13
14
"dependencies" : {
Original file line number Diff line number Diff line change 64
64
65
65
< footer class ="main-footer ">
66
66
< div class ="pull-right hidden-xs ">
67
- < b > Version</ b > 0.0.1
67
+ < b > Version </ b > < span class =" version " > 0.1.0 </ span >
68
68
</ div >
69
69
< strong > Copyright © 2019 < a href ="https://github.com/thomah/ "> Thomah</ a > .</ strong > All rights reserved.
70
70
</ footer >
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : " ./tsconfig.json" ,
3
3
"compilerOptions" : {
4
+ "resolveJsonModule" : true ,
4
5
"outDir" : " ./out-tsc/app" ,
5
6
"types" : []
6
7
},
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ # This script will be a single source of truth for changing versions in the whole app
5
+ # Right now its only changing the version in the template (e.g index.html), but we can manage
6
+ # versions in other files such as CHANGELOG etc.
7
+
8
+ PROJECT_DIR=$( pwd)
9
+ TEMPLATE_FILE=" $PROJECT_DIR /src/app/valyou/valyou.component.html"
10
+ PACKAGE_FILE=" $PROJECT_DIR /package.json"
11
+
12
+ echo " >> Change Version to"
13
+ read -p ' >> Version: ' VERSION
14
+
15
+ echo
16
+ echo " #### Changing version number to $VERSION ####"
17
+
18
+ # change in template file (ideally footer)
19
+ sed -i " s/<span class=\" version\" > .*<\/span>/<span class=\" version\" >$VERSION <\/span>/" $TEMPLATE_FILE
20
+
21
+ # change in package.json
22
+ sed -i " s/\" version\" \:.*/\" version\" \: \" $VERSION \" ,/" $PACKAGE_FILE
23
+
24
+ echo " #### New version number updated ####"
25
+ echo
You can’t perform that action at this time.
0 commit comments