mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-01-30 04:49:08 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44bde7feb9 | ||
|
|
5328bda08e |
File diff suppressed because one or more lines are too long
@@ -195,9 +195,15 @@ export default class Versioning {
|
||||
|
||||
/**
|
||||
* Get the total number of commits on head.
|
||||
*
|
||||
* Note: HEAD should not be used, as it may be detached, resulting in an additional count.
|
||||
*/
|
||||
static async getTotalNumberOfCommits() {
|
||||
const numberOfCommitsAsString = await System.run('git', ['rev-list', '--count', 'HEAD']);
|
||||
const numberOfCommitsAsString = await System.run('git', [
|
||||
'rev-list',
|
||||
'--count',
|
||||
`origin/${this.branch}`,
|
||||
]);
|
||||
|
||||
return Number.parseInt(numberOfCommitsAsString, 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user