1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| 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)
| }
|
|