-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpush.ts
More file actions
executable file
·21 lines (17 loc) · 647 Bytes
/
push.ts
File metadata and controls
executable file
·21 lines (17 loc) · 647 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env node
/**
* It seems that Lerna doesn't publish annotated tags to GitHub
* after the release. This script is a little helper to ensure
* this happens.
*/
import shell from 'shelljs'
import pkg from '../../../lerna.json' with { type: 'json' }
const dryRunArgs = process.env.VSCODE_WDIO_DRY_RUN === 'yes' ? ' --dry-run' : ''
function exec(command: string) {
console.log(`> ${command}\n`)
shell.exec(command)
}
console.log('Pushing the commit and tag.\n')
exec(`git push origin --no-verify${dryRunArgs}`)
exec(`git push origin refs/tags/v${pkg.version} --no-verify${dryRunArgs}`)
console.log('\nSuccessfully pushed.\n')