mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 11:12:54 +02:00
fix: update scripts
This commit is contained in:
parent
32a39aed59
commit
67e745332e
2 changed files with 4 additions and 6 deletions
|
@ -7,9 +7,9 @@ import { themeConfig } from '../src/config'
|
||||||
// pnpm new-post first-post
|
// pnpm new-post first-post
|
||||||
// pnpm new-post first-post.md
|
// pnpm new-post first-post.md
|
||||||
// pnpm new-post first-post.mdx
|
// pnpm new-post first-post.mdx
|
||||||
// pnpm new-post 2025/03/post
|
// pnpm new-post 2025/03/first-post
|
||||||
// pnpm new-post 2025/03/post.md
|
// pnpm new-post 2025/03/first-post.md
|
||||||
// pnpm new-post 2025/03/post.mdx
|
// pnpm new-post 2025/03/first-post.mdx
|
||||||
|
|
||||||
// Process file path
|
// Process file path
|
||||||
const rawPath = process.argv[2] || 'new-post'
|
const rawPath = process.argv[2] || 'new-post'
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { execSync } from 'node:child_process'
|
import { execSync } from 'node:child_process'
|
||||||
import process from 'node:process'
|
import process from 'node:process'
|
||||||
|
|
||||||
// pnpm update-theme
|
|
||||||
|
|
||||||
// Check and set up the remote repository
|
// Check and set up the remote repository
|
||||||
try {
|
try {
|
||||||
execSync('git remote get-url upstream', { stdio: 'ignore' })
|
execSync('git remote get-url upstream', { stdio: 'ignore' })
|
||||||
|
@ -16,7 +14,7 @@ try {
|
||||||
execSync('git fetch upstream', { stdio: 'inherit' })
|
execSync('git fetch upstream', { stdio: 'inherit' })
|
||||||
|
|
||||||
const beforeHash = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
const beforeHash = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
||||||
execSync('git merge upstream/main', { stdio: 'inherit' })
|
execSync('git merge upstream/master', { stdio: 'inherit' })
|
||||||
const afterHash = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
const afterHash = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim()
|
||||||
|
|
||||||
if (beforeHash === afterHash) {
|
if (beforeHash === afterHash) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue