Skip to content

Commit af9ca81

Browse files
committed
Release 0.1.0
1 parent 1551313 commit af9ca81

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "valyou",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
77
"build": "ng build",
88
"test": "ng test",
99
"lint": "ng lint",
10-
"e2e": "ng e2e"
10+
"e2e": "ng e2e",
11+
"change-version": "bash ./version-manager.sh"
1112
},
1213
"private": true,
1314
"dependencies": {

src/app/valyou/valyou.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h1>
6464

6565
<footer class="main-footer">
6666
<div class="pull-right hidden-xs">
67-
<b>Version</b> 0.0.1
67+
<b>Version </b><span class="version">0.1.0</span>
6868
</div>
6969
<strong>Copyright &copy; 2019 <a href="https://github.com/thomah/">Thomah</a>.</strong> All rights reserved.
7070
</footer>

tsconfig.app.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4+
"resolveJsonModule": true,
45
"outDir": "./out-tsc/app",
56
"types": []
67
},

version-manager.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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

0 commit comments

Comments
 (0)