ember-cli-deploy / ember-cli-deploy-revision-data

An ember-cli-plugin to create a unique revision key for the build
MIT License
21 stars 58 forks source link

Deployment fails to prepare when using 'git-commit' #34

Open michaelseanbecker opened 8 years ago

michaelseanbecker commented 8 years ago

When using scm-data-generator 'git-commit' in CirlcleCI, prepare fails.

+- prepare
|  |
|  +- revision-data
|    - creating revision data using `git-commit`
|
+- didFail
TypeError: Cannot read property 'slice' of null
TypeError: Cannot read property 'slice' of null
    at CoreObject.module.exports.CoreObject.extend.generate (/home/ubuntu/the-order/node_modules/ember-cli-deploy-revision-data/lib/data-generators/git-commit.js:14:23)
    at Class.DeployPluginBase.extend._getData (/home/ubuntu/the-order/node_modules/ember-cli-deploy-revision-data/index.js:59:12)
    at Class.DeployPluginBase.extend.prepare (/home/ubuntu/the-order/node_modules/ember-cli-deploy-revision-data/index.js:36:24)
    at Object._pipeline.register.fn (/home/ubuntu/the-order/node_modules/ember-cli-deploy/lib/tasks/pipeline.js:144:21)
    at Pipeline._notifyPipelinePluginHookExecution (/home/ubuntu/the-order/node_modules/ember-cli-deploy/lib/models/pipeline.js:165:19)
    at lib$rsvp$$internal$$tryCatch (/home/ubuntu/the-order/node_modules/rsvp/dist/rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (/home/ubuntu/the-order/node_modules/rsvp/dist/rsvp.js:1048:17)
    at /home/ubuntu/the-order/node_modules/rsvp/dist/rsvp.js:331:11
    at lib$rsvp$asap$$flush (/home/ubuntu/the-order/node_modules/rsvp/dist/rsvp.js:1198:9)
    at doNTCallback0 (node.js:430:9)|
Pipeline aborted

Per @ghedamat the fix will likely need to happen in

https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data/blob/master/lib/data-generators/git-commit.js

and also need to path these two lines

https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data/blob/master/lib/scm-data-generators/git.js#L17-L18

ghedamat commented 8 years ago

thanks @michaelseanbecker

also https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data/pull/33 is a good source to look at when implementing a fix