Plugin for ember-cli-deploy to build the project using corber.
This plugin is work in progress. It's only tested against android target platform so far. I would appreciate any feedback and pull requests.
ember install ember-cli-deploy-corber
// config/deploy.js
module.exports = function(deployTarget) {
let ENV = {
build: {},
corber: {
platform: 'android'
}
};
if (deployTarget === 'development') {
ENV.build.environment = 'development';
ENV.corber.enabled = false;
}
if (deployTarget === 'staging') {
ENV.build.environment = 'production';
}
if (deployTarget === 'production') {
ENV.build.environment = 'production';
ENV.corber.release = true;
ENV.corber.keystore = process.env.ANDROID_KEYSTORE;
ENV.corber.storePassword = process.env.ANDROID_KEYSTORE_STORE_PASSWORD;
ENV.corber.alias = process.env.ANDROID_KEYSTORE_ALIAS;
ENV.corber.password = process.env.ANDROID_KEYSTORE_PASSWORD;
}
return ENV;
};
The plugin adds a corber
key to build context, which provides paths to build artifacts under a platform specific key (e.g. android
).
The plugin supports all options supported by corber build
. Have a look at corber docs.
Additionally an enabled
option controls if a corber build should be run. It defaults to true
.
This plugin implements didBuild
hook. If you run any modifications to generated web artifacts, make sure the modifications are executed before this plugin. Otherwise they won't effect corber builds. You should customize plugin order if needed.
You could include the plugin multiple times to build for more than one platform.