Skip to content

Commit

Permalink
This should fix the wecker build pipeline
Browse files Browse the repository at this point in the history
The version env variable was not exported properly.
  • Loading branch information
mocanew committed Sep 24, 2016
1 parent 3daeabe commit 9b4be55
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
5 changes: 0 additions & 5 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 12 additions & 11 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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

0 comments on commit 9b4be55

Please sign in to comment.