Skip to content

Commit 948b75d

Browse files
committed
chore: update sync script
1 parent 31ad7e5 commit 948b75d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sync.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ await $`git remote rm slidev`
1212
await $`git remote add slidev https://github.com/slidevjs/slidev`
1313
await $`git fetch slidev main`
1414

15-
console.log('Timestamp of last commit:')
15+
console.log('\nTimestamp of last commit:')
1616
const { stdout: timestamp } = await $`git log -1 --format="%at" main`
17-
console.log('Commits since last time:')
17+
console.log('\nCommits since last time:')
1818
const { stdout: hashes } = await $`git log --since="${+(timestamp.toString()) + 1}" slidev/main --format="%H"`
1919

2020
const firstHash = hashes.toString().trim().split('\n').at(-1)
@@ -24,5 +24,5 @@ if (!firstHash) {
2424
}
2525

2626
const command = `git format-patch -k --stdout ${firstHash}...slidev/main --remove-empty -- docs | git am -3 -k --empty=drop`
27-
console.log('Running command:', command)
28-
await $(command)
27+
console.log('\nRunning command:', command)
28+
await $`git format-patch -k --stdout ${firstHash}...slidev/main --remove-empty -- docs | git am -3 -k --empty=drop`

0 commit comments

Comments
 (0)