Skip to content

type: 'git-commit' doesn't work from git submodule #21

Description

@mrloop

Related to rwjblue/git-repo-info#11

From a git submodule I get the following error

+- 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/ewan/projects/questionr/main/node_modules/ember-cli-deploy-revision-data/lib/data-generators/git-commit.js:14:23)

As a workaround in deploy.js I'm using

var exec = require('child_process').execSync;

....

redis: {
  revisionKey: function(){
    return exec('git rev-parse --short --verify HEAD').toString().replace('\n',''); 
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions