diff --git a/client/.gitignore b/client/.gitignore index 1026d1331..7bea36508 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -2,3 +2,4 @@ node_modules build/ coverage/ test/*png +*.tgz diff --git a/client/Dockerfile b/client/Dockerfile index c06827e56..085649e41 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,6 +1,6 @@ FROM node:6.9.0 WORKDIR /home/weave -COPY package.json /home/weave/ +COPY package.json post-install /home/weave/ ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false RUN npm install COPY webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore /home/weave/ diff --git a/client/package.json b/client/package.json index 1ba8b4580..86bb7ce5d 100644 --- a/client/package.json +++ b/client/package.json @@ -91,7 +91,7 @@ "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist/styles", - "install": "./post-install.sh", + "install": "./post-install", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", "test": "jest", @@ -99,7 +99,8 @@ "lint": "eslint app", "clean": "rm build/app.js", "noprobe": "../scope stop && ../scope launch --no-probe --app.window 8760h", - "loadreport": "npm run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d" + "loadreport": "npm run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d", + "s3-publish" : "npm pack && aws s3 cp weave-scope-*.tgz s3://weaveworks-npm-modules/weave-scope/ --acl public-read" }, "jest": { "transform": { diff --git a/client/post-install.sh b/client/post-install similarity index 94% rename from client/post-install.sh rename to client/post-install index d50143ddc..2297fa253 100755 --- a/client/post-install.sh +++ b/client/post-install @@ -1,3 +1,4 @@ +#!/bin/bash pwd=$(pwd) if [[ $pwd == *"node_modules"* ]]; then echo "Installed as Node module. Building package..." diff --git a/scope b/scope old mode 100644 new mode 100755 index 5597b50da..14f3fe360 --- a/scope +++ b/scope @@ -74,7 +74,7 @@ check_docker_access() { } # - The image embeds the weave script & Docker 1.3.1 client -# - Docker versions prior to 1.5.0 do not support --pid=host +# - Docker versions prior to 1.5.0 do not support --pid=host # - Weave needs 1.6.0 now (image pulling changes) MIN_DOCKER_VERSION=1.6.0