Skip to content

Commit 54dce9e

Browse files
committed
dos2unix...
1 parent d2ff3be commit 54dce9e

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
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

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{
2-
"name": "helloworld",
3-
"version": "0.0.1",
4-
"description": "Node.js sample on Docker",
5-
"author": "Mark Lee <code0x9@gmail.com>",
6-
"main": "server.js",
7-
"scripts": {
8-
"start": "node server.js"
9-
},
10-
"dependencies": {}
11-
}
1+
{
2+
"name": "helloworld",
3+
"version": "0.0.1",
4+
"description": "Node.js sample on Docker",
5+
"author": "Mark Lee <code0x9@gmail.com>",
6+
"main": "server.js",
7+
"scripts": {
8+
"start": "node server.js"
9+
},
10+
"dependencies": {}
11+
}

server.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
const port = 8080
2-
const version = 5
3-
let http = require('http')
4-
5-
http.createServer(function(request, response) {
6-
console.log(`${new Date().toISOString()} ${request.connection.remoteAddress} ${request.url} `)
7-
response.end(`Hello World! version:${version}\n`)
8-
}).listen(port)
9-
10-
console.log(`listening on port ${port}`)
1+
const port = 8080
2+
const version = 5
3+
let http = require('http')
4+
5+
http.createServer(function(request, response) {
6+
console.log(`${new Date().toISOString()} ${request.connection.remoteAddress} ${request.url} `)
7+
response.end(`Hello World! version:${version}\n`)
8+
}).listen(port)
9+
10+
console.log(`listening on port ${port}`)

0 commit comments

Comments
 (0)