文件操作 - tag.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/libnpmversion/lib/tag.js
编辑文件内容
const git = require('@npmcli/git') module.exports = async (version, opts) => { const { signGitTag, allowSameVersion, tagVersionPrefix, message, } = opts const tag = `${tagVersionPrefix}${version}` const flags = ['-'] if (signGitTag) { flags.push('s') } if (allowSameVersion) { flags.push('f') } flags.push('m') return git.spawn([ 'tag', flags.join(''), message.replace(/%s/g, version), tag, ], opts) }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件