git-semver-tagger 1.9.26 → 1.10.0

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.
@@ -1,50 +1,55 @@
1
- (function (_, kotlin_kotlin, kotlin_com_zegreatrob_tools_digger_core) {
1
+ (function (_, kotlin_kotlin, kotlin_com_zegreatrob_tools_git_adapter, kotlin_com_zegreatrob_tools_digger_core) {
2
2
  'use strict';
3
3
  //region block: imports
4
4
  var imul = Math.imul;
5
- var split = kotlin_kotlin.$_$.mc;
5
+ var split = kotlin_kotlin.$_$.oc;
6
6
  var collectionSizeOrDefault = kotlin_kotlin.$_$.t4;
7
7
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.y;
8
- var toInt = kotlin_kotlin.$_$.zc;
8
+ var toInt = kotlin_kotlin.$_$.bd;
9
9
  var Unit_instance = kotlin_kotlin.$_$.v;
10
10
  var charSequenceLength = kotlin_kotlin.$_$.w8;
11
11
  var charSequenceGet = kotlin_kotlin.$_$.v8;
12
12
  var digitToIntOrNull = kotlin_kotlin.$_$.qb;
13
- var substring = kotlin_kotlin.$_$.sc;
13
+ var substring = kotlin_kotlin.$_$.uc;
14
14
  var listOf = kotlin_kotlin.$_$.f6;
15
+ var emptyList = kotlin_kotlin.$_$.j5;
15
16
  var protoOf = kotlin_kotlin.$_$.da;
16
17
  var initMetadataForClass = kotlin_kotlin.$_$.f9;
17
18
  var VOID = kotlin_kotlin.$_$.c;
18
19
  var enumEntries = kotlin_kotlin.$_$.s7;
19
- var Enum = kotlin_kotlin.$_$.td;
20
+ var Enum = kotlin_kotlin.$_$.vd;
20
21
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.z;
21
22
  var getStringHashCode = kotlin_kotlin.$_$.d9;
22
23
  var getBooleanHashCode = kotlin_kotlin.$_$.a9;
23
- var THROW_CCE = kotlin_kotlin.$_$.be;
24
+ var THROW_CCE = kotlin_kotlin.$_$.de;
24
25
  var isCharSequence = kotlin_kotlin.$_$.p9;
25
- var trim = kotlin_kotlin.$_$.kd;
26
+ var trim = kotlin_kotlin.$_$.md;
26
27
  var toString = kotlin_kotlin.$_$.fa;
27
28
  var Companion_instance = kotlin_kotlin.$_$.q;
28
29
  var get = kotlin_kotlin.$_$.vb;
29
30
  var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.h2;
30
- var createFailure = kotlin_kotlin.$_$.qe;
31
+ var createFailure = kotlin_kotlin.$_$.se;
31
32
  var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.j2;
32
33
  var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.l2;
33
- var substringBefore = kotlin_kotlin.$_$.qc;
34
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.p1;
35
+ var joinToString = kotlin_kotlin.$_$.v5;
36
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.d2;
37
+ var removePrefix = kotlin_kotlin.$_$.hc;
38
+ var last = kotlin_kotlin.$_$.c6;
39
+ var substringBefore = kotlin_kotlin.$_$.sc;
34
40
  var contains = kotlin_kotlin.$_$.ob;
35
- var to = kotlin_kotlin.$_$.bf;
41
+ var to = kotlin_kotlin.$_$.df;
36
42
  var _Result___get_isSuccess__impl__sndoy8 = kotlin_kotlin.$_$.k2;
37
43
  var Result__exceptionOrNull_impl_p6xea9 = kotlin_kotlin.$_$.i2;
44
+ var ProcessError = kotlin_com_zegreatrob_tools_git_adapter.$_$.b;
38
45
  var mapOf = kotlin_kotlin.$_$.j6;
39
46
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.i1;
40
- var joinToString = kotlin_kotlin.$_$.v5;
41
47
  var initMetadataForObject = kotlin_kotlin.$_$.k9;
42
48
  var hashCode = kotlin_kotlin.$_$.e9;
43
49
  var equals = kotlin_kotlin.$_$.z8;
44
50
  var Defaults_getInstance = kotlin_com_zegreatrob_tools_digger_core.$_$.a;
45
51
  var initMetadataForCompanion = kotlin_kotlin.$_$.g9;
46
- var toString_0 = kotlin_kotlin.$_$.af;
47
- var emptyList = kotlin_kotlin.$_$.j5;
52
+ var toString_0 = kotlin_kotlin.$_$.cf;
48
53
  //endregion
49
54
  //region block: pre-declaration
50
55
  initMetadataForClass(SnapshotReason, 'SnapshotReason', VOID, Enum);
@@ -109,11 +114,11 @@
109
114
  return substring(_this__u8e3s4, startIndex);
110
115
  }
111
116
  function calculateNextVersion(_this__u8e3s4, implicitPatch, disableDetached, versionRegex, forceSnapshot, releaseBranch) {
112
- var gitStatus = _this__u8e3s4.yl_1.ol();
117
+ var gitStatus = _this__u8e3s4.fm_1.ql();
113
118
  var tmp;
114
119
  if (disableDetached) {
115
120
  // Inline function 'kotlin.text.isEmpty' call
116
- var this_0 = gitStatus.ul_1;
121
+ var this_0 = gitStatus.wl_1;
117
122
  tmp = charSequenceLength(this_0) === 0;
118
123
  } else {
119
124
  tmp = false;
@@ -124,7 +129,16 @@
124
129
  var tmp0_elvis_lhs = lastVersionAndTag(_this__u8e3s4);
125
130
  var tmp_0;
126
131
  if (tmp0_elvis_lhs == null) {
127
- return new Failure(listOf(FailureVersionReasons_NoTagsExist_getInstance()));
132
+ // Inline function 'kotlin.run' call
133
+ var allTagNames = _this__u8e3s4.fm_1.nl();
134
+ var tmp_1;
135
+ // Inline function 'kotlin.collections.isNotEmpty' call
136
+ if (!allTagNames.p()) {
137
+ tmp_1 = new Failure(emptyList(), lightweightTagsFound(allTagNames));
138
+ } else {
139
+ tmp_1 = new Failure(listOf(FailureVersionReasons_NoTagsExist_getInstance()));
140
+ }
141
+ return tmp_1;
128
142
  } else {
129
143
  tmp_0 = tmp0_elvis_lhs;
130
144
  }
@@ -132,15 +146,15 @@
132
146
  var previousVersionNumber = _destruct__k2r9zo.fa();
133
147
  var lastTagDescription = _destruct__k2r9zo.ga();
134
148
  var tmp1_elvis_lhs = asSemverComponents(previousVersionNumber);
135
- var tmp_1;
149
+ var tmp_2;
136
150
  if (tmp1_elvis_lhs == null) {
137
151
  return new Failure(listOf(FailureVersionReasons_VersionMissingElements_getInstance()));
138
152
  } else {
139
- tmp_1 = tmp1_elvis_lhs;
153
+ tmp_2 = tmp1_elvis_lhs;
140
154
  }
141
- var previousVersionComponents = tmp_1;
142
- var incrementComponent = findAppropriateIncrement(_this__u8e3s4.yl_1, lastTagDescription, implicitPatch, versionRegex);
143
- var tmp3_elvis_lhs = incrementComponent == null ? null : incrementComponent.cm(previousVersionComponents);
155
+ var previousVersionComponents = tmp_2;
156
+ var incrementComponent = findAppropriateIncrement(_this__u8e3s4.fm_1, lastTagDescription, implicitPatch, versionRegex);
157
+ var tmp3_elvis_lhs = incrementComponent == null ? null : incrementComponent.jm(previousVersionComponents);
144
158
  var currentVersionNumber = tmp3_elvis_lhs == null ? previousVersionNumber : tmp3_elvis_lhs;
145
159
  var reasonsToUseSnapshot = snapshotReasons(releaseBranch, currentVersionNumber, previousVersionNumber, gitStatus, forceSnapshot);
146
160
  // Inline function 'kotlin.collections.isNotEmpty' call
@@ -151,48 +165,48 @@
151
165
  SnapshotReason.call(this, 'FORCED', 0);
152
166
  SnapshotReason_FORCED_instance = this;
153
167
  }
154
- protoOf(SnapshotReason$FORCED).fm = function (_this__u8e3s4) {
155
- return _this__u8e3s4.km_1;
168
+ protoOf(SnapshotReason$FORCED).mm = function (_this__u8e3s4) {
169
+ return _this__u8e3s4.rm_1;
156
170
  };
157
171
  var SnapshotReason_FORCED_instance;
158
172
  function SnapshotReason$DIRTY() {
159
173
  SnapshotReason.call(this, 'DIRTY', 1);
160
174
  SnapshotReason_DIRTY_instance = this;
161
175
  }
162
- protoOf(SnapshotReason$DIRTY).fm = function (_this__u8e3s4) {
163
- return !_this__u8e3s4.gm_1.ql_1;
176
+ protoOf(SnapshotReason$DIRTY).mm = function (_this__u8e3s4) {
177
+ return !_this__u8e3s4.nm_1.sl_1;
164
178
  };
165
179
  var SnapshotReason_DIRTY_instance;
166
180
  function SnapshotReason$AHEAD() {
167
181
  SnapshotReason.call(this, 'AHEAD', 2);
168
182
  SnapshotReason_AHEAD_instance = this;
169
183
  }
170
- protoOf(SnapshotReason$AHEAD).fm = function (_this__u8e3s4) {
171
- return !(_this__u8e3s4.gm_1.rl_1 === 0);
184
+ protoOf(SnapshotReason$AHEAD).mm = function (_this__u8e3s4) {
185
+ return !(_this__u8e3s4.nm_1.tl_1 === 0);
172
186
  };
173
187
  var SnapshotReason_AHEAD_instance;
174
188
  function SnapshotReason$BEHIND() {
175
189
  SnapshotReason.call(this, 'BEHIND', 3);
176
190
  SnapshotReason_BEHIND_instance = this;
177
191
  }
178
- protoOf(SnapshotReason$BEHIND).fm = function (_this__u8e3s4) {
179
- return !(_this__u8e3s4.gm_1.sl_1 === 0);
192
+ protoOf(SnapshotReason$BEHIND).mm = function (_this__u8e3s4) {
193
+ return !(_this__u8e3s4.nm_1.ul_1 === 0);
180
194
  };
181
195
  var SnapshotReason_BEHIND_instance;
182
196
  function SnapshotReason$NOT_RELEASE_BRANCH() {
183
197
  SnapshotReason.call(this, 'NOT_RELEASE_BRANCH', 4);
184
198
  SnapshotReason_NOT_RELEASE_BRANCH_instance = this;
185
199
  }
186
- protoOf(SnapshotReason$NOT_RELEASE_BRANCH).fm = function (_this__u8e3s4) {
187
- return !(_this__u8e3s4.gm_1.tl_1 === _this__u8e3s4.hm_1);
200
+ protoOf(SnapshotReason$NOT_RELEASE_BRANCH).mm = function (_this__u8e3s4) {
201
+ return !(_this__u8e3s4.nm_1.vl_1 === _this__u8e3s4.om_1);
188
202
  };
189
203
  var SnapshotReason_NOT_RELEASE_BRANCH_instance;
190
204
  function SnapshotReason$NO_NEW_VERSION() {
191
205
  SnapshotReason.call(this, 'NO_NEW_VERSION', 5);
192
206
  SnapshotReason_NO_NEW_VERSION_instance = this;
193
207
  }
194
- protoOf(SnapshotReason$NO_NEW_VERSION).fm = function (_this__u8e3s4) {
195
- return _this__u8e3s4.im_1 === _this__u8e3s4.jm_1;
208
+ protoOf(SnapshotReason$NO_NEW_VERSION).mm = function (_this__u8e3s4) {
209
+ return _this__u8e3s4.pm_1 === _this__u8e3s4.qm_1;
196
210
  };
197
211
  var SnapshotReason_NO_NEW_VERSION_instance;
198
212
  function values() {
@@ -219,14 +233,14 @@
219
233
  function SnapshotReason(name, ordinal) {
220
234
  Enum.call(this, name, ordinal);
221
235
  }
222
- protoOf(SnapshotReason).nm = function (check) {
223
- return this.fm(check);
236
+ protoOf(SnapshotReason).um = function (check) {
237
+ return this.mm(check);
224
238
  };
225
239
  function ChangeType$Major() {
226
240
  ChangeType.call(this, 'Major', 0, 3);
227
241
  ChangeType_Major_instance = this;
228
242
  }
229
- protoOf(ChangeType$Major).cm = function (components) {
243
+ protoOf(ChangeType$Major).jm = function (components) {
230
244
  // Inline function 'kotlin.collections.component1' call
231
245
  var major = components.c1(0);
232
246
  return '' + (major + 1 | 0) + '.0.0';
@@ -236,7 +250,7 @@
236
250
  ChangeType.call(this, 'Minor', 1, 2);
237
251
  ChangeType_Minor_instance = this;
238
252
  }
239
- protoOf(ChangeType$Minor).cm = function (components) {
253
+ protoOf(ChangeType$Minor).jm = function (components) {
240
254
  // Inline function 'kotlin.collections.component1' call
241
255
  var major = components.c1(0);
242
256
  // Inline function 'kotlin.collections.component2' call
@@ -248,7 +262,7 @@
248
262
  ChangeType.call(this, 'Patch', 2, 1);
249
263
  ChangeType_Patch_instance = this;
250
264
  }
251
- protoOf(ChangeType$Patch).cm = function (components) {
265
+ protoOf(ChangeType$Patch).jm = function (components) {
252
266
  // Inline function 'kotlin.collections.component1' call
253
267
  var major = components.c1(0);
254
268
  // Inline function 'kotlin.collections.component2' call
@@ -262,7 +276,7 @@
262
276
  ChangeType.call(this, 'None', 3, 0);
263
277
  ChangeType_None_instance = this;
264
278
  }
265
- protoOf(ChangeType$None).cm = function (components) {
279
+ protoOf(ChangeType$None).jm = function (components) {
266
280
  // Inline function 'kotlin.collections.component1' call
267
281
  var major = components.c1(0);
268
282
  // Inline function 'kotlin.collections.component2' call
@@ -284,11 +298,11 @@
284
298
  }
285
299
  function ChangeType(name, ordinal, priority) {
286
300
  Enum.call(this, name, ordinal);
287
- this.bm_1 = priority;
301
+ this.im_1 = priority;
288
302
  }
289
303
  function findAppropriateIncrement(gitAdapter, previousTag, implicitPatch, minorRegex) {
290
304
  // Inline function 'kotlin.also' call
291
- var this_0 = gitAdapter.nl('HEAD', '^' + previousTag);
305
+ var this_0 = gitAdapter.pl('HEAD', '^' + previousTag);
292
306
  if (this_0.p())
293
307
  return null;
294
308
  // Inline function 'kotlin.collections.map' call
@@ -322,28 +336,28 @@
322
336
  var _iterator__ex2g4s = tmp0.r();
323
337
  while (_iterator__ex2g4s.s()) {
324
338
  var element = _iterator__ex2g4s.t();
325
- if (element.nm(statusCheck)) {
339
+ if (element.um(statusCheck)) {
326
340
  destination.v(element);
327
341
  }
328
342
  }
329
343
  return destination;
330
344
  }
331
345
  function StatusCheck(gitStatus, releaseBranch, currentVersionNumber, previousVersionNumber, forceSnapshot) {
332
- this.gm_1 = gitStatus;
333
- this.hm_1 = releaseBranch;
334
- this.im_1 = currentVersionNumber;
335
- this.jm_1 = previousVersionNumber;
336
- this.km_1 = forceSnapshot;
346
+ this.nm_1 = gitStatus;
347
+ this.om_1 = releaseBranch;
348
+ this.pm_1 = currentVersionNumber;
349
+ this.qm_1 = previousVersionNumber;
350
+ this.rm_1 = forceSnapshot;
337
351
  }
338
352
  protoOf(StatusCheck).toString = function () {
339
- return 'StatusCheck(gitStatus=' + this.gm_1.toString() + ', releaseBranch=' + this.hm_1 + ', currentVersionNumber=' + this.im_1 + ', previousVersionNumber=' + this.jm_1 + ', forceSnapshot=' + this.km_1 + ')';
353
+ return 'StatusCheck(gitStatus=' + this.nm_1.toString() + ', releaseBranch=' + this.om_1 + ', currentVersionNumber=' + this.pm_1 + ', previousVersionNumber=' + this.qm_1 + ', forceSnapshot=' + this.rm_1 + ')';
340
354
  };
341
355
  protoOf(StatusCheck).hashCode = function () {
342
- var result = this.gm_1.hashCode();
343
- result = imul(result, 31) + getStringHashCode(this.hm_1) | 0;
344
- result = imul(result, 31) + getStringHashCode(this.im_1) | 0;
345
- result = imul(result, 31) + getStringHashCode(this.jm_1) | 0;
346
- result = imul(result, 31) + getBooleanHashCode(this.km_1) | 0;
356
+ var result = this.nm_1.hashCode();
357
+ result = imul(result, 31) + getStringHashCode(this.om_1) | 0;
358
+ result = imul(result, 31) + getStringHashCode(this.pm_1) | 0;
359
+ result = imul(result, 31) + getStringHashCode(this.qm_1) | 0;
360
+ result = imul(result, 31) + getBooleanHashCode(this.rm_1) | 0;
347
361
  return result;
348
362
  };
349
363
  protoOf(StatusCheck).equals = function (other) {
@@ -351,15 +365,15 @@
351
365
  return true;
352
366
  if (!(other instanceof StatusCheck))
353
367
  return false;
354
- if (!this.gm_1.equals(other.gm_1))
368
+ if (!this.nm_1.equals(other.nm_1))
355
369
  return false;
356
- if (!(this.hm_1 === other.hm_1))
370
+ if (!(this.om_1 === other.om_1))
357
371
  return false;
358
- if (!(this.im_1 === other.im_1))
372
+ if (!(this.pm_1 === other.pm_1))
359
373
  return false;
360
- if (!(this.jm_1 === other.jm_1))
374
+ if (!(this.qm_1 === other.qm_1))
361
375
  return false;
362
- if (!(this.km_1 === other.km_1))
376
+ if (!(this.rm_1 === other.rm_1))
363
377
  return false;
364
378
  return true;
365
379
  };
@@ -370,24 +384,24 @@
370
384
  return changeType_0(versionRegex, tmp$ret$0);
371
385
  }
372
386
  function highestPriority(left, right) {
373
- return left == null ? right : right == null ? left : left.bm_1 > right.bm_1 ? left : right;
387
+ return left == null ? right : right == null ? left : left.im_1 > right.im_1 ? left : right;
374
388
  }
375
389
  function changeType_0(_this__u8e3s4, message) {
376
390
  var tmp;
377
- var tmp0_safe_receiver = _this__u8e3s4.on_1;
391
+ var tmp0_safe_receiver = _this__u8e3s4.vn_1;
378
392
  if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fc(message)) === true) {
379
- tmp = findMatchType(message, _this__u8e3s4.on_1);
393
+ tmp = findMatchType(message, _this__u8e3s4.vn_1);
380
394
  } else {
381
- if (_this__u8e3s4.nn_1.fc(message)) {
395
+ if (_this__u8e3s4.un_1.fc(message)) {
382
396
  tmp = ChangeType_Major_getInstance();
383
397
  } else {
384
- if (_this__u8e3s4.mn_1.fc(message)) {
398
+ if (_this__u8e3s4.tn_1.fc(message)) {
385
399
  tmp = ChangeType_Minor_getInstance();
386
400
  } else {
387
- if (_this__u8e3s4.ln_1.fc(message)) {
401
+ if (_this__u8e3s4.sn_1.fc(message)) {
388
402
  tmp = ChangeType_Patch_getInstance();
389
403
  } else {
390
- if (_this__u8e3s4.kn_1.fc(message)) {
404
+ if (_this__u8e3s4.rn_1.fc(message)) {
391
405
  tmp = ChangeType_None_getInstance();
392
406
  } else {
393
407
  tmp = null;
@@ -487,7 +501,48 @@
487
501
  }
488
502
  function FailureVersionReasons(name, ordinal, message) {
489
503
  Enum.call(this, name, ordinal);
490
- this.rn_1 = message;
504
+ this.yn_1 = message;
505
+ }
506
+ function lightweightTagsFound(tags) {
507
+ // Inline function 'kotlin.text.buildString' call
508
+ // Inline function 'kotlin.apply' call
509
+ var this_0 = StringBuilder_init_$Create$();
510
+ // Inline function 'kotlin.text.appendLine' call
511
+ var value = 'found ' + tags.d1() + ' tag' + (tags.d1() === 1 ? '' : 's') + ' (' + joinToString(tags, ', ') + ') but ' + (tags.d1() === 1 ? 'it is' : 'they are') + ' lightweight.';
512
+ // Inline function 'kotlin.text.appendLine' call
513
+ this_0.o(value).q(_Char___init__impl__6a9atx(10));
514
+ // Inline function 'kotlin.text.appendLine' call
515
+ var value_0 = 'Tagger requires annotated tags so it can record version metadata.';
516
+ // Inline function 'kotlin.text.appendLine' call
517
+ this_0.o(value_0).q(_Char___init__impl__6a9atx(10));
518
+ // Inline function 'kotlin.text.appendLine' call
519
+ this_0.q(_Char___init__impl__6a9atx(10));
520
+ // Inline function 'kotlin.text.appendLine' call
521
+ var value_1 = 'Recreate ' + (tags.d1() === 1 ? 'it' : 'them') + ' with:';
522
+ // Inline function 'kotlin.text.appendLine' call
523
+ this_0.o(value_1).q(_Char___init__impl__6a9atx(10));
524
+ // Inline function 'kotlin.collections.forEach' call
525
+ var _iterator__ex2g4s = tags.r();
526
+ while (_iterator__ex2g4s.s()) {
527
+ var element = _iterator__ex2g4s.t();
528
+ // Inline function 'kotlin.text.appendLine' call
529
+ var value_2 = ' git tag -d ' + element;
530
+ // Inline function 'kotlin.text.appendLine' call
531
+ this_0.o(value_2).q(_Char___init__impl__6a9atx(10));
532
+ // Inline function 'kotlin.text.appendLine' call
533
+ var value_3 = ' git tag -a ' + element + ' <sha> -m "' + removePrefix(element, 'v') + '"';
534
+ // Inline function 'kotlin.text.appendLine' call
535
+ this_0.o(value_3).q(_Char___init__impl__6a9atx(10));
536
+ // Inline function 'kotlin.text.appendLine' call
537
+ var value_4 = ' git push --force origin ' + element;
538
+ // Inline function 'kotlin.text.appendLine' call
539
+ this_0.o(value_4).q(_Char___init__impl__6a9atx(10));
540
+ if (!(element === last(tags))) {
541
+ // Inline function 'kotlin.text.appendLine' call
542
+ this_0.q(_Char___init__impl__6a9atx(10));
543
+ }
544
+ }
545
+ return this_0.toString();
491
546
  }
492
547
  function FailureVersionReasons_NoRemote_getInstance() {
493
548
  FailureVersionReasons_initEntries();
@@ -502,7 +557,7 @@
502
557
  return FailureVersionReasons_VersionMissingElements_instance;
503
558
  }
504
559
  function lastVersionAndTag(_this__u8e3s4) {
505
- var tmp0_elvis_lhs = _this__u8e3s4.yl_1.pl(0);
560
+ var tmp0_elvis_lhs = _this__u8e3s4.fm_1.rl(0);
506
561
  var tmp;
507
562
  if (tmp0_elvis_lhs == null) {
508
563
  return null;
@@ -535,19 +590,20 @@
535
590
  }
536
591
  return tmp_2;
537
592
  }
538
- function tag(_this__u8e3s4, version, releaseBranch, userName, userEmail) {
593
+ function tag(_this__u8e3s4, version, releaseBranch, userName, userEmail, allowDetachedHead) {
594
+ allowDetachedHead = allowDetachedHead === VOID ? false : allowDetachedHead;
539
595
  var isSnapshot_0 = isSnapshot(version);
540
- var headTag = _this__u8e3s4.yl_1.ml('HEAD');
596
+ var headTag = _this__u8e3s4.fm_1.ol('HEAD');
541
597
  var alreadyTagged = !(headTag == null);
542
- var headBranch = _this__u8e3s4.yl_1.ol().tl_1;
543
- var isNotOnReleaseBranch = !(headBranch === releaseBranch);
598
+ var headBranch = _this__u8e3s4.fm_1.ql().vl_1;
599
+ var isNotOnReleaseBranch = !allowDetachedHead && !(headBranch === releaseBranch);
544
600
  var tmp;
545
601
  if (isSnapshot_0 || alreadyTagged || isNotOnReleaseBranch) {
546
602
  var tmp_0 = TagErrors_instance;
547
- var tmp_1 = to(isSnapshot_0, 'being snapshot');
603
+ var tmp_1 = to(isSnapshot_0, "being snapshot. Run 'tagger calculate-version' to see why this version has -SNAPSHOT suffix");
548
604
  var tmp_2 = TagErrors_instance;
549
605
  // Inline function 'kotlin.collections.filterKeys' call
550
- var this_0 = mapOf([tmp_1, to(alreadyTagged, tmp_2.tn(headTag == null ? null : headTag.vl_1)), to(isNotOnReleaseBranch, TagErrors_instance.un(releaseBranch, headBranch))]);
606
+ var this_0 = mapOf([tmp_1, to(alreadyTagged, tmp_2.ao(headTag == null ? null : headTag.cm_1)), to(isNotOnReleaseBranch, TagErrors_instance.bo(releaseBranch, headBranch))]);
551
607
  var result = LinkedHashMap_init_$Create$();
552
608
  // Inline function 'kotlin.collections.iterator' call
553
609
  var _iterator__ex2g4s = this_0.k1().r();
@@ -557,12 +613,12 @@
557
613
  result.p2(entry.l1(), entry.m1());
558
614
  }
559
615
  }
560
- tmp = new Error_0(tmp_0.vn(joinToString(result.o2(), ', ')));
616
+ tmp = new Error_0(tmp_0.co(joinToString(result.o2(), ', ')));
561
617
  } else {
562
618
  // Inline function 'kotlin.runCatching' call
563
619
  var tmp_3;
564
620
  try {
565
- _this__u8e3s4.yl_1.kl(version, 'HEAD', userName, userEmail);
621
+ _this__u8e3s4.fm_1.ll(version, 'HEAD', userName, userEmail);
566
622
  // Inline function 'kotlin.Companion.success' call
567
623
  tmp_3 = _Result___init__impl__xyqfz8(Unit_instance);
568
624
  } catch ($p) {
@@ -581,7 +637,7 @@
581
637
  var tmp_5;
582
638
  if (_Result___get_isSuccess__impl__sndoy8(this_1)) {
583
639
  _Result___get_value__impl__bjfvqg(this_1);
584
- _this__u8e3s4.yl_1.ll();
640
+ _this__u8e3s4.fm_1.ml();
585
641
  // Inline function 'kotlin.Companion.success' call
586
642
  var value = Success_getInstance();
587
643
  tmp_5 = _Result___init__impl__xyqfz8(value);
@@ -595,8 +651,14 @@
595
651
  if (exception == null) {
596
652
  tmp_6 = _Result___get_value__impl__bjfvqg(this_2);
597
653
  } else {
598
- var tmp0_elvis_lhs = exception.message;
599
- tmp_6 = new Error_0(tmp0_elvis_lhs == null ? 'Unknown error during tagging' : tmp0_elvis_lhs);
654
+ var tmp_7;
655
+ if (exception instanceof ProcessError) {
656
+ tmp_7 = exception.bm();
657
+ } else {
658
+ var tmp1_elvis_lhs = exception.message;
659
+ tmp_7 = tmp1_elvis_lhs == null ? 'Unknown error during tagging' : tmp1_elvis_lhs;
660
+ }
661
+ tmp_6 = new Error_0(tmp_7);
600
662
  }
601
663
  tmp = tmp_6;
602
664
  }
@@ -606,15 +668,15 @@
606
668
  return contains(_this__u8e3s4, 'SNAPSHOT');
607
669
  }
608
670
  function TagErrors() {
609
- this.sn_1 = 'being snapshot';
671
+ this.zn_1 = "being snapshot. Run 'tagger calculate-version' to see why this version has -SNAPSHOT suffix";
610
672
  }
611
- protoOf(TagErrors).vn = function (messages) {
673
+ protoOf(TagErrors).co = function (messages) {
612
674
  return 'skipping tag due to ' + messages;
613
675
  };
614
- protoOf(TagErrors).tn = function (headTag) {
676
+ protoOf(TagErrors).ao = function (headTag) {
615
677
  return 'already tagged ' + headTag;
616
678
  };
617
- protoOf(TagErrors).un = function (releaseBranch, headBranch) {
679
+ protoOf(TagErrors).bo = function (releaseBranch, headBranch) {
618
680
  return 'not on release branch ' + releaseBranch + ' - branch was ' + headBranch;
619
681
  };
620
682
  var TagErrors_instance;
@@ -646,49 +708,49 @@
646
708
  }
647
709
  function Error_0(message) {
648
710
  TagResult.call(this);
649
- this.wn_1 = message;
711
+ this.do_1 = message;
650
712
  }
651
713
  protoOf(Error_0).toString = function () {
652
- return 'Error(message=' + this.wn_1 + ')';
714
+ return 'Error(message=' + this.do_1 + ')';
653
715
  };
654
716
  protoOf(Error_0).hashCode = function () {
655
- return getStringHashCode(this.wn_1);
717
+ return getStringHashCode(this.do_1);
656
718
  };
657
719
  protoOf(Error_0).equals = function (other) {
658
720
  if (this === other)
659
721
  return true;
660
722
  if (!(other instanceof Error_0))
661
723
  return false;
662
- if (!(this.wn_1 === other.wn_1))
724
+ if (!(this.do_1 === other.do_1))
663
725
  return false;
664
726
  return true;
665
727
  };
666
728
  function TagResult() {
667
729
  }
668
730
  function TaggerCore(adapter) {
669
- this.yl_1 = adapter;
731
+ this.fm_1 = adapter;
670
732
  }
671
733
  protoOf(TaggerCore).toString = function () {
672
- return 'TaggerCore(adapter=' + toString(this.yl_1) + ')';
734
+ return 'TaggerCore(adapter=' + toString(this.fm_1) + ')';
673
735
  };
674
736
  protoOf(TaggerCore).hashCode = function () {
675
- return hashCode(this.yl_1);
737
+ return hashCode(this.fm_1);
676
738
  };
677
739
  protoOf(TaggerCore).equals = function (other) {
678
740
  if (this === other)
679
741
  return true;
680
742
  if (!(other instanceof TaggerCore))
681
743
  return false;
682
- if (!equals(this.yl_1, other.yl_1))
744
+ if (!equals(this.fm_1, other.fm_1))
683
745
  return false;
684
746
  return true;
685
747
  };
686
748
  function Defaults() {
687
749
  Defaults_instance = this;
688
- this.xn_1 = Defaults_getInstance().xk_1;
689
- this.yn_1 = Defaults_getInstance().wk_1;
690
- this.zn_1 = Defaults_getInstance().vk_1;
691
- this.ao_1 = Defaults_getInstance().uk_1;
750
+ this.eo_1 = Defaults_getInstance().xk_1;
751
+ this.fo_1 = Defaults_getInstance().wk_1;
752
+ this.go_1 = Defaults_getInstance().vk_1;
753
+ this.ho_1 = Defaults_getInstance().uk_1;
692
754
  }
693
755
  var Defaults_instance;
694
756
  function Defaults_getInstance_0() {
@@ -697,9 +759,9 @@
697
759
  return Defaults_instance;
698
760
  }
699
761
  function Companion() {
700
- this.bo_1 = "version regex must include groups named 'major', 'minor', 'patch', and 'none'.";
762
+ this.io_1 = "version regex must include groups named 'major', 'minor', 'patch', and 'none'.";
701
763
  }
702
- protoOf(Companion).co = function (regexPattern) {
764
+ protoOf(Companion).jo = function (regexPattern) {
703
765
  return contains(regexPattern, '?<major>') && contains(regexPattern, '?<minor>') && contains(regexPattern, '?<patch>') && contains(regexPattern, '?<none>');
704
766
  };
705
767
  var Companion_instance_0;
@@ -707,21 +769,21 @@
707
769
  return Companion_instance_0;
708
770
  }
709
771
  function VersionRegex(none, patch, minor, major, unified) {
710
- this.kn_1 = none;
711
- this.ln_1 = patch;
712
- this.mn_1 = minor;
713
- this.nn_1 = major;
714
- this.on_1 = unified;
772
+ this.rn_1 = none;
773
+ this.sn_1 = patch;
774
+ this.tn_1 = minor;
775
+ this.un_1 = major;
776
+ this.vn_1 = unified;
715
777
  }
716
778
  protoOf(VersionRegex).toString = function () {
717
- return 'VersionRegex(none=' + this.kn_1.toString() + ', patch=' + this.ln_1.toString() + ', minor=' + this.mn_1.toString() + ', major=' + this.nn_1.toString() + ', unified=' + toString_0(this.on_1) + ')';
779
+ return 'VersionRegex(none=' + this.rn_1.toString() + ', patch=' + this.sn_1.toString() + ', minor=' + this.tn_1.toString() + ', major=' + this.un_1.toString() + ', unified=' + toString_0(this.vn_1) + ')';
718
780
  };
719
781
  protoOf(VersionRegex).hashCode = function () {
720
- var result = hashCode(this.kn_1);
721
- result = imul(result, 31) + hashCode(this.ln_1) | 0;
722
- result = imul(result, 31) + hashCode(this.mn_1) | 0;
723
- result = imul(result, 31) + hashCode(this.nn_1) | 0;
724
- result = imul(result, 31) + (this.on_1 == null ? 0 : hashCode(this.on_1)) | 0;
782
+ var result = hashCode(this.rn_1);
783
+ result = imul(result, 31) + hashCode(this.sn_1) | 0;
784
+ result = imul(result, 31) + hashCode(this.tn_1) | 0;
785
+ result = imul(result, 31) + hashCode(this.un_1) | 0;
786
+ result = imul(result, 31) + (this.vn_1 == null ? 0 : hashCode(this.vn_1)) | 0;
725
787
  return result;
726
788
  };
727
789
  protoOf(VersionRegex).equals = function (other) {
@@ -729,32 +791,32 @@
729
791
  return true;
730
792
  if (!(other instanceof VersionRegex))
731
793
  return false;
732
- if (!equals(this.kn_1, other.kn_1))
794
+ if (!equals(this.rn_1, other.rn_1))
733
795
  return false;
734
- if (!equals(this.ln_1, other.ln_1))
796
+ if (!equals(this.sn_1, other.sn_1))
735
797
  return false;
736
- if (!equals(this.mn_1, other.mn_1))
798
+ if (!equals(this.tn_1, other.tn_1))
737
799
  return false;
738
- if (!equals(this.nn_1, other.nn_1))
800
+ if (!equals(this.un_1, other.un_1))
739
801
  return false;
740
- if (!equals(this.on_1, other.on_1))
802
+ if (!equals(this.vn_1, other.vn_1))
741
803
  return false;
742
804
  return true;
743
805
  };
744
806
  function VersionResult$Failure$_get_message_$lambda_nuugae(it) {
745
- return it.rn_1;
807
+ return it.yn_1;
746
808
  }
747
809
  function Success_0(version, snapshotReasons) {
748
810
  snapshotReasons = snapshotReasons === VOID ? emptyList() : snapshotReasons;
749
- this.do_1 = version;
750
- this.eo_1 = snapshotReasons;
811
+ this.ko_1 = version;
812
+ this.lo_1 = snapshotReasons;
751
813
  }
752
814
  protoOf(Success_0).toString = function () {
753
- return 'Success(version=' + this.do_1 + ', snapshotReasons=' + toString(this.eo_1) + ')';
815
+ return 'Success(version=' + this.ko_1 + ', snapshotReasons=' + toString(this.lo_1) + ')';
754
816
  };
755
817
  protoOf(Success_0).hashCode = function () {
756
- var result = getStringHashCode(this.do_1);
757
- result = imul(result, 31) + hashCode(this.eo_1) | 0;
818
+ var result = getStringHashCode(this.ko_1);
819
+ result = imul(result, 31) + hashCode(this.lo_1) | 0;
758
820
  return result;
759
821
  };
760
822
  protoOf(Success_0).equals = function (other) {
@@ -762,30 +824,43 @@
762
824
  return true;
763
825
  if (!(other instanceof Success_0))
764
826
  return false;
765
- if (!(this.do_1 === other.do_1))
827
+ if (!(this.ko_1 === other.ko_1))
766
828
  return false;
767
- if (!equals(this.eo_1, other.eo_1))
829
+ if (!equals(this.lo_1, other.lo_1))
768
830
  return false;
769
831
  return true;
770
832
  };
771
- function Failure(reasons) {
772
- this.fo_1 = reasons;
833
+ function Failure(reasons, customMessage) {
834
+ customMessage = customMessage === VOID ? null : customMessage;
835
+ this.mo_1 = reasons;
836
+ this.no_1 = customMessage;
773
837
  }
774
838
  protoOf(Failure).ba = function () {
775
- return 'Inappropriate configuration: ' + joinToString(this.fo_1, '\n', VOID, VOID, VOID, VOID, VersionResult$Failure$_get_message_$lambda_nuugae);
839
+ var tmp0_elvis_lhs = this.no_1;
840
+ var tmp;
841
+ if (tmp0_elvis_lhs == null) {
842
+ tmp = 'Inappropriate configuration: ' + joinToString(this.mo_1, '\n', VOID, VOID, VOID, VOID, VersionResult$Failure$_get_message_$lambda_nuugae);
843
+ } else {
844
+ tmp = tmp0_elvis_lhs;
845
+ }
846
+ return tmp;
776
847
  };
777
848
  protoOf(Failure).toString = function () {
778
- return 'Failure(reasons=' + toString(this.fo_1) + ')';
849
+ return 'Failure(reasons=' + toString(this.mo_1) + ', customMessage=' + this.no_1 + ')';
779
850
  };
780
851
  protoOf(Failure).hashCode = function () {
781
- return hashCode(this.fo_1);
852
+ var result = hashCode(this.mo_1);
853
+ result = imul(result, 31) + (this.no_1 == null ? 0 : getStringHashCode(this.no_1)) | 0;
854
+ return result;
782
855
  };
783
856
  protoOf(Failure).equals = function (other) {
784
857
  if (this === other)
785
858
  return true;
786
859
  if (!(other instanceof Failure))
787
860
  return false;
788
- if (!equals(this.fo_1, other.fo_1))
861
+ if (!equals(this.mo_1, other.mo_1))
862
+ return false;
863
+ if (!(this.no_1 == other.no_1))
789
864
  return false;
790
865
  return true;
791
866
  };
@@ -807,6 +882,6 @@
807
882
  _.$_$.j = Defaults_getInstance_0;
808
883
  //endregion
809
884
  return _;
810
- }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./tools-digger-core.js')));
885
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./tools-git-adapter.js'), require('./tools-digger-core.js')));
811
886
 
812
887
  //# sourceMappingURL=tools-tagger-core.js.map