-
Notifications
You must be signed in to change notification settings - Fork 1
/
generator.sh
182 lines (162 loc) · 5.57 KB
/
generator.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# execution examples
# RERUN_MODULES=$(pwd)/modules ./rerun semver:
# RERUN_MODULES=$(pwd)/modules ./rerun semver: bump-release --input_version '1.0.0' --segment 'major'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: bump-special --input_version '1.0.0-rc01' --segment 'special' --special 'rc02'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: compare --left_version '1.0.0' --compare 'eq' --right_version '1.0.0'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: extract --input_version '1.4.8-rc01' --segment major
# RERUN_MODULES=$(pwd)/modules ./rerun semver: parse --input_string 'my-module-1.0.0-rc01.tar.gz' --trim_suffix '.tar.gz'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: promote-to-release --input_version '1.0.4-rc01'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: promote-to-special --input_version '1.0.4' --special 'rc01'
# RERUN_MODULES=$(pwd)/modules ./rerun semver: validate --input_version '1.4.8-rc01'
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan bump-release
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan bump-special
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan compare
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan extract
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan parse
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan promote-to-release
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan promote-to-special
# RERUN_MODULES=$(pwd)/modules ./rerun stubbs: test --module semver --plan validate
## modules
# rerun semver:
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-module \
--description "utilities for semantic versions" \
--module "semver"
## commands
# rerun semver: bump-release
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "bump-release" \
--description "bump release version segment" \
--module "semver"
# rerun semver: bump-special
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "bump-special" \
--description "bump special version segment" \
--module "semver"
# rerun semver: compare
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "compare" \
--description "compare semantic versions" \
--module "semver"
# rerun semver: extract
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "extract" \
--description "extract semantic version segment" \
--module "semver"
# rerun semver: parse
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "parse" \
--description "parse input string for semantic version" \
--module "semver"
# rerun semver: promote-to-release
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "promote-to-release" \
--description "promote special version to release" \
--module "semver"
# rerun semver: promote-to-special
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "promote-to-special" \
--description "promote release version to special" \
--module "semver"
# rerun semver: validate
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-command \
--command "validate" \
--description "validate input semantic version" \
--module "semver"
## options
# --input_string
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "parse" \
--description "input string containing semantic version" \
--export "false" \
--long "input_string" \
--module "semver" \
--option "input_string" \
--required "true"
# --input_version
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "extract,validate,bump-release,bump-special,promote-to-release,promote-to-special" \
--description "input semantic version" \
--export "false" \
--long "input_version" \
--module "semver" \
--option "input_version" \
--required "true"
# --trim_suffix
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "parse" \
--description "suffix to trim from special version" \
--export "false" \
--long "trim_suffix" \
--module "semver" \
--option "trim_suffix" \
--required "false"
# --left_version
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "compare" \
--description "left side input version" \
--export "false" \
--long "left_version" \
--module "semver" \
--option "left_version" \
--required "true"
# --right_version
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "compare" \
--description "right side input version" \
--export "false" \
--long "right_version" \
--module "semver" \
--option "right_version" \
--required "true"
# --compare
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "compare" \
--description "comparison type (eq|lt|gt|pess_minor|pess_patch)" \
--export "false" \
--long "compare" \
--module "semver" \
--option "compare" \
--required "true"
# --segment
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "extract,bump-release" \
--description "version segment" \
--export "false" \
--long "segment" \
--module "semver" \
--option "segment" \
--required "true"
# --special
RERUN_MODULES=$(pwd)/modules ./rerun stubbs: \
add-option \
--arg "true" \
--command "bump-special,promote-to-special" \
--description "special version" \
--export "false" \
--long "special" \
--module "semver" \
--option "special" \
--required "true"