hiiro 0.1.271 → 0.1.272
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/hiiro/version.rb +1 -1
- data/lib/hiiro.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5b6bf6b9a6ac5ef1a816f32f071b301aba4b4649b4a980f51d503749997554d
|
|
4
|
+
data.tar.gz: f1b46d52bfc0762bdbc3ba5a9a06ee32179b3eb7cbe27de2ad4720ee7d26129b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ab66bcd87f995a2fa549dc95a3ebee3fa7bc78b5bb58940e8af929806341eb5b0803aad5e094584f4452d084160f268c474ed89444528b41b82fe0db960fbb8
|
|
7
|
+
data.tar.gz: e055d1c6b39d74ee920281d1f1e00e42cacd43c22cecbbbf731bf6e22c59fb790c9d2b2aea73b78f8265f95055ba949eb4cacacdbd2724e947eb3c4c77f1446e
|
data/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Done. CHANGELOG.md
|
|
1
|
+
Done. CHANGELOG.md updated with v0.1.272.
|
data/lib/hiiro/version.rb
CHANGED
data/lib/hiiro.rb
CHANGED
|
@@ -214,6 +214,8 @@ class Hiiro
|
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
def run
|
|
217
|
+
auto_tag_branch_with_task if tasks_enabled?
|
|
218
|
+
|
|
217
219
|
run_args = runners.using_default? ? [subcmd, *args].compact : args
|
|
218
220
|
result = runner.run(*run_args)
|
|
219
221
|
|
|
@@ -232,6 +234,22 @@ class Hiiro
|
|
|
232
234
|
exit 1
|
|
233
235
|
end
|
|
234
236
|
|
|
237
|
+
def auto_tag_branch_with_task
|
|
238
|
+
task = environment.task
|
|
239
|
+
return unless task
|
|
240
|
+
|
|
241
|
+
branch = environment.tree&.branch
|
|
242
|
+
return if branch.nil? || branch.empty?
|
|
243
|
+
return if %w[master main].include?(branch)
|
|
244
|
+
|
|
245
|
+
tag_store = Tags.new(:branch)
|
|
246
|
+
return if tag_store.get(branch).include?(task.name)
|
|
247
|
+
|
|
248
|
+
tag_store.add(branch, task.name)
|
|
249
|
+
rescue
|
|
250
|
+
# never let auto-tagging break a command
|
|
251
|
+
end
|
|
252
|
+
|
|
235
253
|
def runnable?
|
|
236
254
|
runner
|
|
237
255
|
end
|