mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 08:13:09 +02:00
commit
1af70a5930
2 changed files with 5 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
*.pem
|
*.pem
|
||||||
run.bat
|
run.bat
|
||||||
|
api-docs.json
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
/**
|
/**
|
||||||
* Module dependencies
|
* Module dependencies
|
||||||
*/
|
*/
|
||||||
import Git from 'nodegit';
|
import prominence from 'prominence';
|
||||||
|
import git from 'git-last-commit';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show core info
|
* Show core info
|
||||||
|
@ -14,11 +15,11 @@ import Git from 'nodegit';
|
||||||
module.exports = (params) =>
|
module.exports = (params) =>
|
||||||
new Promise(async (res, rej) =>
|
new Promise(async (res, rej) =>
|
||||||
{
|
{
|
||||||
const repository = await Git.Repository.open(__dirname + '/../../');
|
const commit = await prominence(git).getLastCommit();
|
||||||
|
|
||||||
res({
|
res({
|
||||||
maintainer: config.maintainer,
|
maintainer: config.maintainer,
|
||||||
commit: (await repository.getHeadCommit()).sha(),
|
commit: commit.shortHash,
|
||||||
secure: config.https.enable
|
secure: config.https.enable
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue