Skip to content

Commit

Permalink
🐞 fix: 路径异常
Browse files Browse the repository at this point in the history
  • Loading branch information
白云苍狗 committed Sep 8, 2022
1 parent ba5db42 commit 1e3cf1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ const fs = require('fs')
const path = require('path')

if (process.env.RELEASE_VERSION) {
const version = process.env.RELEASE_VERSION.replace(/[Vv]/g, '')
const version = process.env.RELEASE_VERSION.split('/').reverse()[0]
console.log('当前版本:', version);
const pkg = require('../package/hexo-theme-async/package.json')
pkg.version = version
fs.writeFileSync(path.resolve('../package/hexo-theme-async/package.json'), JSON.stringify(pkg, null, 4), 'utf-8')
fs.writeFileSync(path.resolve(__dirname, '../package/hexo-theme-async/package.json'), JSON.stringify(pkg, null, 4), 'utf-8')
}

0 comments on commit 1e3cf1b

Please sign in to comment.