chore(ci): slice sha1 to 7 characters (#15974)

This commit is contained in:
dwieeb
2018-10-16 14:04:07 -05:00
committed by Adam Bradley
parent d33c6efb5a
commit 277d222fb1

View File

@@ -13,8 +13,9 @@ const s3 = new S3({ apiVersion: '2006-03-01' });
class CIScreenshotConnector extends IonicConnector {
async initBuild(opts) {
const result = await execa.stdout('git', ['log', '-1', '--format=%h%n%an <%ae>%n%ct%n%s']);
const [ sha1short, author, timestamp, msg ] = result.split('\n');
const result = await execa.stdout('git', ['log', '-1', '--format=%H%n%an <%ae>%n%ct%n%s']);
const [ sha1, author, timestamp, msg ] = result.split('\n');
const sha1short = sha1.slice(0, 7);
opts.buildId = sha1short;
opts.buildMessage = msg;