mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Add timestamp next to hashes
This commit is contained in:
parent
cfa228a431
commit
5fcec4b688
@ -15,6 +15,11 @@ function commitHashes() {
|
|||||||
const remoteHash = execSync('git ls-remote origin HEAD').toString().split('\t')[0].slice(0, 7);
|
const remoteHash = execSync('git ls-remote origin HEAD').toString().split('\t')[0].slice(0, 7);
|
||||||
return { localHash, remoteHash };
|
return { localHash, remoteHash };
|
||||||
}
|
}
|
||||||
|
function commitTimestamp() {
|
||||||
|
const localTimestamp = execSync('git log -1 --format=%ct').toString().trimEnd();
|
||||||
|
const remoteTimestamp = execSync('git show -s --format=%ct').toString().trimEnd();
|
||||||
|
return { localTimestamp, remoteTimestamp };
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||||
@ -53,8 +58,8 @@ export default {
|
|||||||
embed.addFields(
|
embed.addFields(
|
||||||
{
|
{
|
||||||
name: '> __Repository__', value: MessageTool.concatMessage(
|
name: '> __Repository__', value: MessageTool.concatMessage(
|
||||||
`**Local:** ${commitHashes().localHash}`,
|
`**Local:** ${commitHashes().localHash} <t:${commitTimestamp().localTimestamp}:R>`,
|
||||||
`**Remote:** ${commitHashes().remoteHash}`
|
`**Remote:** ${commitHashes().remoteHash} <t:${commitTimestamp().remoteTimestamp}:R>`
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{name: '> __Dependencies__', value: MessageTool.concatMessage(
|
{name: '> __Dependencies__', value: MessageTool.concatMessage(
|
||||||
|
Loading…
Reference in New Issue
Block a user