mirror of
https://github.com/hanzoai/jose.git
synced 2026-09-24 17:00:01 +00:00
13 lines
480 B
JavaScript
Executable File
13 lines
480 B
JavaScript
Executable File
const { execSync } = require('child_process')
|
|
const { readFileSync, writeFileSync } = require('fs')
|
|
|
|
const dryRun = execSync('commit-and-tag-version --dry-run', { encoding: 'utf-8' })
|
|
;/tagging release v(\d+\.\d+\.\d+)/gm.test(dryRun)
|
|
|
|
const version = RegExp.$1
|
|
const tagName = `v${version}`
|
|
|
|
const path = './src/jwks/remote.ts'
|
|
writeFileSync(path, readFileSync(path, { encoding: 'utf-8' }).replace(/v(\d+\.\d+\.\d+)/g, tagName))
|
|
execSync(`git add ${path}`, { stdio: 'inherit' })
|