File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ use() {
18
18
done
19
19
}
20
20
21
+ _findEnvironmentVariable () {
22
+ local variableName=$1
23
+ test -n " ${! variableName} " && return
24
+ read -p " $variableName : " " $variableName "
25
+ test -z " ${! variableName} " && _error " $variableName not found"
26
+ }
27
+
21
28
use jq git curl grep tr sed xargs md5sum
22
29
23
30
_releaseMessage () {
@@ -63,12 +70,6 @@ _fileHashes() {
63
70
done
64
71
}
65
72
66
- _findGithubToken () {
67
- test -n " $GITHUB_TOKEN " && return
68
- read -p " GITHUB_TOKEN: " GITHUB_TOKEN
69
- test -z " $GITHUB_TOKEN " && _error " GITHUB_TOKEN not found"
70
- }
71
-
72
73
_findGitHeads () {
73
74
local last_tag=$( git tag --sort=-creatordate | head -1)
74
75
GIT_TAG=${2:- HEAD}
@@ -82,7 +83,7 @@ _findGitHeads() {
82
83
83
84
main () {
84
85
_findGitHeads $@
85
- _findGithubToken
86
+ _findEnvironmentVariable GITHUB_TOKEN
86
87
_releaseMessage
87
88
}
88
89
You can’t perform that action at this time.
0 commit comments