File tree Expand file tree Collapse file tree 3 files changed +30
-30
lines changed Expand file tree Collapse file tree 3 files changed +30
-30
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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 } ` )
You can’t perform that action at this time.
0 commit comments