This repository was archived by the owner on Nov 20, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +33
-4
lines changed
Expand file tree Collapse file tree 4 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ jobs:
107107 command : yarn run build || echo "No build step."
108108 - run :
109109 name : Releasing and publishing
110- command : yarn run release --dry || (yarn global add @tunnckocore/release-cli && yarn run release --dry )
110+ command : yarn run release || (yarn global add @tunnckocore/release-cli && yarn run release)
111111
112112workflows :
113113 version : 2
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
3- require ( '@tunnckocore/release-cli/cli' ) ;
3+ 'use strict' ;
4+
5+ const path = require ( 'path' ) ;
6+ const proc = require ( 'process' ) ;
7+ const parser = require ( 'mri' ) ;
8+ const esmLoader = require ( 'esm' ) ;
9+
10+ const pkg = require ( './package' ) ;
11+
12+ const esmRequire = esmLoader ( module ) ;
13+
14+ function interop ( x ) {
15+ if ( Object . keys ( x ) . length === 1 && x . default ) {
16+ return x . default ;
17+ }
18+ return x ;
19+ }
20+
21+ const mod = esmRequire ( path . join ( __dirname , 'src' , 'cli.js' ) ) ;
22+ const cli = interop ( mod ) ;
23+
24+ const argv = parser ( proc . argv . slice ( 2 ) , {
25+ default : {
26+ cwd : proc . cwd ( ) ,
27+ ci : true ,
28+ } ,
29+ } ) ;
30+
31+ cli ( pkg , argv ) . catch ( console . error ) ;
Original file line number Diff line number Diff line change 99 "test" : " nyc asia" ,
1010 "commit" : " yarn lint && yarn test && yarn dry" ,
1111 "dry" : " git add -A && git status --porcelain && gitcommit -sS" ,
12- "release" : " tunnckocore-release "
12+ "release" : " node cli.js "
1313 },
1414 "engines" : {
1515 "node" : " ^8.11.0 || >=10.13.0"
1616 },
1717 "dependencies" : {
1818 "@tunnckocore/release-cli" : " ^1.3.1" ,
19- "esm" : " ^3.0.84"
19+ "esm" : " ^3.0.84" ,
20+ "mri" : " ^1.1.1"
2021 },
2122 "devDependencies" : {
2223 "@tunnckocore/config" : " ^1.0.2" ,
You can’t perform that action at this time.
0 commit comments