Skip to content

Commit d2ff3be

Browse files
committed
bumpup to
1 parent 5b9d850 commit d2ff3be

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bumpup.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/usr/bin/env bash
2-
VERSION_STRING="const version ="
3-
VER=`grep "$VERSION_STRING" server.js | awk '{print $NF}'`
4-
NEW_VER=$(($VER + 1))
5-
echo "current version: $VER, new version: $NEW_VER"
6-
sed -i "s/$VERSION_STRING $VER$/$VERSION_STRING $NEW_VER/" server.js
7-
8-
git commit -am "bumpup to $NEW_VER"
9-
git push public
1+
#!/usr/bin/env bash
2+
VERSION_STRING="const version ="
3+
VER=`grep "$VERSION_STRING" server.js | awk '{print $NF}'`
4+
NEW_VER=$(($VER + 1))
5+
echo "current version: $VER, new version: $NEW_VER"
6+
sed -i "s/$VERSION_STRING $VER$/$VERSION_STRING $NEW_VER/" server.js
7+
8+
git commit -am "bumpup to $NEW_VER"
9+
git push public

server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const port = 8080
2-
const version =
2+
const version = 5
33
let http = require('http')
44

55
http.createServer(function(request, response) {

0 commit comments

Comments
 (0)