mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Fix formatting
This commit is contained in:
parent
b80318f233
commit
bd58cbedf7
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -209,16 +209,18 @@ export default class Versioning {
|
|||||||
static async getVersionDescription() {
|
static async getVersionDescription() {
|
||||||
const versionTags = (await this.git(['tag', '--list', '--merged', 'HEAD', '--sort=-creatordate']))
|
const versionTags = (await this.git(['tag', '--list', '--merged', 'HEAD', '--sort=-creatordate']))
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.filter(tag => new RegExp(this.grepCompatibleInputVersionRegex).test(tag));
|
.filter((tag) => new RegExp(this.grepCompatibleInputVersionRegex).test(tag));
|
||||||
|
|
||||||
if (versionTags.length === 0) {
|
if (versionTags.length === 0) {
|
||||||
core.warning('No valid version tags found. Using fallback description.');
|
core.warning('No valid version tags found. Using fallback description.');
|
||||||
|
|
||||||
return this.git(['describe', '--long', '--tags', '--always', 'HEAD']);
|
return this.git(['describe', '--long', '--tags', '--always', 'HEAD']);
|
||||||
}
|
}
|
||||||
|
|
||||||
const latestVersionTag = versionTags[0];
|
const latestVersionTag = versionTags[0];
|
||||||
const commitsCount = (await this.git(['rev-list', `${latestVersionTag}..HEAD`, '--count'])).trim();
|
const commitsCount = (await this.git(['rev-list', `${latestVersionTag}..HEAD`, '--count'])).trim();
|
||||||
const commitHash = (await this.git(['rev-parse', '--short', 'HEAD'])).trim();
|
const commitHash = (await this.git(['rev-parse', '--short', 'HEAD'])).trim();
|
||||||
|
|
||||||
return `${latestVersionTag}-${commitsCount}-g${commitHash}`;
|
return `${latestVersionTag}-${commitsCount}-g${commitHash}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user