Skip to content

Commit

Permalink
Adding version
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Bjelkholm committed Feb 29, 2016
1 parent 6ec9844 commit eb279b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Expand Up @@ -10,6 +10,9 @@ RUN npm install

COPY . /usr/src/app

ARG VERSION=dev
ENV VERSION ${VERSION}

RUN npm run compile:prod

CMD npm run prod
2 changes: 1 addition & 1 deletion circle.yml
Expand Up @@ -4,7 +4,7 @@ machine:
dependencies:
override:
- docker info
- docker build -t victorbjelkholm/ipfsbin .
- docker build --build-arg VERSION=$CIRCLE_BUILD_NUM -t victorbjelkholm/ipfsbin .
test:
override:
- docker run -it victorbjelkholm/ipfsbin npm test
Expand Down
7 changes: 1 addition & 6 deletions webpack.config.js
@@ -1,5 +1,4 @@
var webpack = require('webpack')
var fs = require('fs')
var path = require('path')
var OfflinePlugin = require('offline-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
Expand All @@ -9,11 +8,7 @@ const production = env === 'prod'

var offline_plugin = new OfflinePlugin({
version: () => {
if (production) {
return (new Date()).toString()
} else {
return JSON.parse(fs.readFileSync('./package.json').toString()).version
}
return process.env.VERSION
},
ServiceWorker: false,
AppCache: {
Expand Down

0 comments on commit eb279b7

Please sign in to comment.