Skip to content

Commit acb7f77

Browse files
committed
feat(githubrelease): add -n flag to no display any prompts
1 parent 1b4253d commit acb7f77

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ You can find more details here: [Setup token for cli][setup-token-for-cli].
5050
* `-l`: Generate a changelog entry and save it to `<changelog>`.
5151
* `-p`: Push `<master>`, `<develop>`, and tags to `<remote>`.
5252
* `-u`: Update `<master>` and `<develop>` branches from `<remote>` using rebase.
53+
* `-n`: Do not display any prompts.
5354

5455
### Argument options
5556
* `-c`: Location of the `<changelog>`. Defaults to `CHANGELOG.md`.

githubrelease

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ FLAG OPTIONS:
206206
-l Generate a changelog entry and save it to <changelog>.
207207
-p Push <master>, <develop>, and tags to <remote>.
208208
-u Update <master> and <develop> branches from <remote> using rebase.
209+
-n Do not display any prompts
209210
210211
ARGUMENT OPTIONS:
211212
-c Location of the <changelog>. Defaults to 'CHANGELOG.md'.
@@ -249,6 +250,7 @@ EOF
249250
arglog=
250251
argpull=
251252
argpush=
253+
argnoprompt=
252254
argchangelog=
253255
argmaster=
254256
argdevelop=
@@ -267,7 +269,7 @@ step=
267269
bump=
268270

269271
# Grab command line arguments and flags
270-
while getopts "hvlupc:r:m:d:P:s:b:" OPTION
272+
while getopts "hvlupnc:r:m:d:P:s:b:" OPTION
271273
do
272274
case $OPTION in
273275
h)
@@ -287,6 +289,9 @@ do
287289
p)
288290
argpush=1
289291
;;
292+
n)
293+
argnoprompt=1
294+
;;
290295
c)
291296
argchangelog=$OPTARG
292297
;;
@@ -339,6 +344,7 @@ bump : $bump | $($conventionalRecommendedBump -p $($conventionalCommitsDete
339344
preset : $preset | $($conventionalCommitsDetector)
340345
counter : $counter
341346
step : $step
347+
noprompts : $argnoprompt
342348
EOF
343349
$chalk cyan "============================"
344350

0 commit comments

Comments
 (0)