diff --git a/deploy.sh b/deploy.sh index 4bc630de4..29fbdc49d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -99,6 +99,7 @@ selectNodeVersion () { # ---------- echo Handling node.js deployment. +echo "\"$SCM_COMMIT_ID\"" > $DEPLOYMENT_SOURCE/scm-commit-id.json # 1. KuduSync if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then diff --git a/env.js b/env.js index c063c2274..2669dee95 100644 --- a/env.js +++ b/env.js @@ -21,11 +21,9 @@ function config ( ) { var software = require('./package.json'); var git = require('git-rev'); - if (readENV('SCM_GIT_EMAIL') == 'windowsazure' && readENV('ScmType') == 'GitHub') { - git.cwd('/home/site/repository'); - } - if (readENV('SCM_COMMIT_ID')) { - env.head = readENV('SCM_COMMIT_ID'); + if (readENV('APPSETTING_ScmType') == readENV('ScmType') && readENV('ScmType') == 'GitHub') { + env.head = require('./scm-commit-id.json'); + console.log("SCM COMMIT ID", env.head); } else { git.short(function record_git_head (head) { console.log("GIT HEAD", head); diff --git a/lib/websocket.js b/lib/websocket.js index 161d239f8..159c85413 100644 --- a/lib/websocket.js +++ b/lib/websocket.js @@ -38,7 +38,7 @@ var dir2Char = { //these only effect the socket.io.js file that is sent to the client, but better than nothing 'browser client minification': true, 'browser client etag': true, - 'browser client gzip': true + 'browser client gzip': false }); } // get data from database and setup to update every minute