Skip to content

Commit e2a7a9d

Browse files
author
Eddie Flores
committed
Hackish way of getting the commit message for HEAD.
1 parent 17d39fe commit e2a7a9d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/ssh-adapter.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ module.exports = CoreObject.extend({
2929
},
3030

3131
upload: function(buffer) {
32-
var key = this.taggingAdapter.createTag();
32+
// var key = this.taggingAdapter.createTag();
33+
var syncExec = this.syncExec || require('sync-exec');
34+
var commandResult = syncExec("git log -n 1 --pretty=format:'{%n \"commit\": \"%H\",%n \"author\": \"%an <%ae>\",%n \"date\": \"%ad\",%n \"message\": \"%f\"%n},' $@ | perl -pe 'BEGIN{print \"[\"}; END{print \"]\n\"}' | perl -pe 's/},]/}]/'").stdout;
35+
var commandResultJSON = JSON.parse(commandResult);
36+
var key = commandResultJSON[0].message;
37+
console.log("Uploading with this key ", key);
3338
return this._uploadIfMissing(buffer, key);
3439
},
3540

@@ -54,6 +59,7 @@ module.exports = CoreObject.extend({
5459
reject(err);
5560
} else {
5661
conn.end();
62+
console.log('The list ->>>>>>>>>>>>> ', list);
5763
resolve(list);
5864
}
5965
});

0 commit comments

Comments
 (0)