diff --git a/build.js b/build.js index cb33f45..08e65e0 100644 --- a/build.js +++ b/build.js @@ -137,10 +137,5 @@ async.waterfall([ }); zipFile.writeZip('./build.zip'); cb(); - }, - cb => { - if (!isMode('release')) return cb(); - - exec('export GITHUB_RELEASE_VERSION=' + require('./package.json').version, () => cb()); } ], (e) => log(e ? e : '--- Build finished ---', e ? 'red' : 'green')); \ No newline at end of file diff --git a/package.json b/package.json index 7d8715d..063f8bb 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build:zip": "node build.js --zip", "build:android": "node build.js --android --install", "build:all": "node build.js --webpack --android --install --zip", - "build:makeRelease": "node build.js --webpack --zip --release", + "build:makeRelease": "node build.js --webpack --zip", "production": "npm install --production --progress=false && (screen -dm sudo service homecontrol restart && screen -dm sudo service wakeonlan restart && screen -dm sudo service radiopi restart)", "dev": "npm-run-all --parallel watch:wakeonlan watch:radiopi watch:homecontrol watch:scsslint webpackDevServer", "devww": "npm-run-all --parallel watch:wakeonlan watch:radiopi watch:homecontrol watch:scsslint", diff --git a/wercker.yml b/wercker.yml index 2652749..6a40a6c 100644 --- a/wercker.yml +++ b/wercker.yml @@ -37,14 +37,15 @@ build: - script: name: list files code: ls -l --color -deploy: - steps: - - github-create-release: - token: $GITHUB_TOKEN - tag: $GITHUB_RELEASE_VERSION - title: Home Control $GITHUB_RELEASE_VERSION - draft: true - - github-upload-asset: - token: $GITHUB_TOKEN - file: build.zip - filename: homecontrol-$GITHUB_RELEASE_VERSION.zip \ No newline at end of file + - script: + name: set env version + code: export GITHUB_RELEASE_VERSION=$(echo "console.log(require('./package.json').version);" | node) + - github-create-release: + token: $GITHUB_TOKEN + tag: $GITHUB_RELEASE_VERSION + title: Home Control $GITHUB_RELEASE_VERSION + draft: true + - github-upload-asset: + token: $GITHUB_TOKEN + file: build.zip + filename: homecontrol-$GITHUB_RELEASE_VERSION.zip \ No newline at end of file