-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_fixtures.sh
executable file
·223 lines (198 loc) · 5.29 KB
/
create_fixtures.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#! /bin/sh
rm -rf Tests/swift-conventional-commit-parserTests/Fixtures
mkdir -p Tests/swift-conventional-commit-parserTests/Fixtures
cd Tests/swift-conventional-commit-parserTests/Fixtures
git config --global init.defaultBranch main
mkdir -p GitRepoNoCommits
cd GitRepoNoCommits
git init
git checkout -b main
cd ..
mkdir -p GitRepoChoreOnMainFeatOnBranch
cd GitRepoChoreOnMainFeatOnBranch
git init
touch "README.md"
git add "README.md"
git commit -m "chore: Add README.md"
git checkout -b "feature/myAwesomeFeature"
touch "AwesomeCode.swift"
git add "AwesomeCode.swift"
git commit -m "feat: My awesome feature"
cd ..
mkdir -p GitRepoChoreOnMainFeatOnBranchTaggedVersion1
cd GitRepoChoreOnMainFeatOnBranchTaggedVersion1
git init
touch "AwesomeCodeForVersion1.swift"
git add "AwesomeCodeForVersion1.swift"
git commit -m "feat!: Awesome code for version 1"
git tag 1.0.0
touch "README.md"
git add "README.md"
git commit -m "chore: Add README.md"
git checkout -b "feature/myAwesomeFeature"
touch "AwesomeCodeTaggedVersion1.swift"
git add "AwesomeCodeTaggedVersion1.swift"
git commit -m "feat: My awesome feature"
cd ..
mkdir -p GitRepoChoreOnMainFeatOnBranchTaggedVersion1Release
cd GitRepoChoreOnMainFeatOnBranchTaggedVersion1Release
git init
touch "AwesomeCodeForVersion1.md"
git add "AwesomeCodeForVersion1.md"
git commit -m "feat!: Awesome code for version 1"
git tag 1.0.0
touch "README.md"
git add "README.md"
git commit -m "chore: Add README.md"
git checkout -b "feature/myAwesomeFeature"
touch "AwesomeCodeTaggedVersion1.md"
git add "AwesomeCodeTaggedVersion1.md"
git commit -m "feat: My awesome feature"
git checkout main
git merge "feature/myAwesomeFeature"
cd ..
mkdir -p GitRepoChoreOnMainNoFormattedCommitOnBranch
cd GitRepoChoreOnMainNoFormattedCommitOnBranch
git init
touch "README.md"
git add "README.md"
git commit -m "chore: Add README.md"
git checkout -b "feature/myAwesomeFeature"
touch "AwesomeCodeWithoutFormattedCommit.swift"
git add "AwesomeCodeWithoutFormattedCommit.swift"
git commit -m "wip"
cd ..
mkdir -p GitRepoChoreOnMainNoFormattedCommitOnBranchTaggedVersion1
cd GitRepoChoreOnMainNoFormattedCommitOnBranchTaggedVersion1
git init
touch "AnotherAwesomeCodeForVersion1.swift"
git add "AnotherAwesomeCodeForVersion1.swift"
git commit -m "feat!: Awesome code for version 1"
git tag 1.0.0
touch "README.md"
git add "README.md"
git commit -m "chore: Add README.md"
git checkout -b "feature/myAwesomeFeature"
touch "AwesomeCodeWithoutFormattedCommitTaggedVersion1.swift"
git add "AwesomeCodeWithoutFormattedCommitTaggedVersion1.swift"
git commit -m "wip"
cd ..
mkdir -p GitRepoHotfixNoFormattedCommitOnBranch
cd GitRepoHotfixNoFormattedCommitOnBranch
git init
touch "v1.md"
git add "v1.md"
git commit -m "feat!: v1"
git tag 1.0.0
touch "v2.md"
git add "v2.md"
git commit -m "feat!: v2"
git tag 2.0.0
git checkout -b release/1.1 1.0.0
git checkout -b hotfix
touch "hotfix.md"
git add "hotfix.md"
git commit -m "wip"
cd ..
mkdir -p GitRepoHotfixFormattedCommitOnBranch
cd GitRepoHotfixFormattedCommitOnBranch
git init
touch "v1.md"
git add "v1.md"
git commit -m "feat!: v1"
git tag 1.0.0
touch "v1.1.md"
git add "v1.1.md"
git commit -m "feat: v1.1"
git tag 1.1.0
touch "v1.2.md"
git add "v1.2.md"
git commit -m "feat: v1.2"
git tag 1.2.0
touch "v2.md"
git add "v2.md"
git commit -m "feat!: v2"
git tag 2.0.0
git checkout -b release/1.1.1 1.1.0
git checkout -b hotfix
touch "hotfix.md"
git add "hotfix.md"
git commit -m "hotfix: Fix the thing!"
cd ..
mkdir -p GitRepoHotfixFormattedCommitOnBranchRelease
cd GitRepoHotfixFormattedCommitOnBranchRelease
git init
touch "v1.md"
git add "v1.md"
git commit -m "feat!: v1"
git tag 1.0.0
touch "v1.1.md"
git add "v1.1.md"
git commit -m "feat: v1.1"
git tag 1.1.0
touch "v1.2.md"
git add "v1.2.md"
git commit -m "feat: v1.2"
git tag 1.2.0
touch "v2.md"
git add "v2.md"
git commit -m "feat!: v2"
git tag 2.0.0
git checkout -b release/1.1.1 1.1.0
git checkout -b hotfix
touch "hotfix.md"
git add "hotfix.md"
git commit -m "hotfix: Fix the thing!"
git checkout release/1.1.1
git merge hotfix
cd ..
mkdir -p GitRepoMainBranchFeatOnBranchLastTagNotSemanticVersion
cd GitRepoMainBranchFeatOnBranchLastTagNotSemanticVersion
git init
touch "v1.1.md"
git add "v1.1.md"
git commit -m "feat: v1.1"
git tag "SomeOtherApp1.0.0"
git tag 1.1.0
git tag "SomeOtherApp1.1.0"
git checkout -b feat/myFeature
touch "v1.2.md"
git add "v1.2.md"
git commit -m "feat: v1.2"
cd ..
mkdir -p GitRepoMainBranchFeatOnBranchLastTagNotSemanticVersionRelease
cd GitRepoMainBranchFeatOnBranchLastTagNotSemanticVersionRelease
git init
touch "v1.1.md"
git add "v1.1.md"
git commit -m "feat: v1.1"
git tag "SomeOtherApp1.0.0"
git tag 1.1.0
git tag "SomeOtherApp1.1.0"
git checkout -b feat/myFeature
touch "v1.2.md"
git add "v1.2.md"
git commit -m "feat: v1.2"
git checkout main
git merge feat/myFeature
cd ..
mkdir -p GitRepoMainBranchNoCommitOnBranchOtherBranchesWithChores
cd GitRepoMainBranchNoCommitOnBranchOtherBranchesWithChores
git init
touch "main.md"
git add "main.md"
git commit -m "chore: main.md"
git checkout -b otherBranch
touch "otherBranch.md"
git add "otherBranch.md"
git commit -m "chore: otherBranch.md"
git checkout main
git checkout -b anotherBranch
touch "anotherBranch.md"
git add "anotherBranch.md"
git commit -m "chore: anotherBranch.md"
git checkout main
git checkout -b feat/myFeature
touch "myFeature.md"
git add "myFeature.md"
git commit -m "wip"