More verbose dirty branch

pull/259/head
Webber 2021-05-09 21:57:03 +02:00
parent 14b33954b5
commit d69be9baea
3 changed files with 21 additions and 4 deletions

7
dist/index.js vendored
View File

@ -2168,7 +2168,12 @@ class Versioning {
*/ */
static isDirty() { static isDirty() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const output = yield this.git(['status', '--porcelain'], { silent: true }); const output = yield system_1.default.run('sh', undefined, {
input: Buffer.from('git status --porcelain'),
silent: true,
});
core.info('Output: ');
core.info(output);
const isDirty = output !== ''; const isDirty = output !== '';
if (isDirty) { if (isDirty) {
core.info('Changes were made to the following files and folders:\n'); core.info('Changes were made to the following files and folders:\n');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -250,9 +250,21 @@ export default class Versioning {
* Returns whether there are uncommitted changes that are not ignored. * Returns whether there are uncommitted changes that are not ignored.
*/ */
static async isDirty() { static async isDirty() {
const output = await this.git(['status', '--porcelain']); const output = await System.run('sh', undefined, {
input: Buffer.from('git status --porcelain'),
silent: true,
});
return output !== ''; core.info('Output: ');
core.info(output);
const isDirty = output !== '';
if (isDirty) {
core.info('Changes were made to the following files and folders:\n');
core.info(output);
}
return isDirty;
} }
/** /**