groundskeeper-bitcore 0.31.0 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f7d4a6ef906f8367078f634abf8e517d573e276039b7a8a5d800eca5e8ab010
4
- data.tar.gz: 1341e7c739775b08b343dcbf8ed3ce36927cd219ffad29e81b1dcd4a98ae57b5
3
+ metadata.gz: fc1ab08b2e8620a96de42eee267d2274a9fa752f9e33d6bd1238eb4fa9ec1b89
4
+ data.tar.gz: 053b37c294e199247e93baddae4cd8f43e5886a753004288f821322ea82e23d1
5
5
  SHA512:
6
- metadata.gz: 9f1cbf4bf33dab8ceb97393ae64a2228ebdbe12bf902a25132e708b5915caaba7b312ff6d567fe827b2965a201acb5a120112747d028e0b6ef6ee80ed1cf8044
7
- data.tar.gz: 777dacc3fd9135cde4c4e0eaaa8ceb37ef76b23433352046db9a4b0cd20f21ecb83b26467628e462db48c2d7c407e9b559c34246a05e4bc05688d4950a0725a4
6
+ metadata.gz: cb13a970df10e139a70b86240cf1ab955c8e8ad6108a9599435117caf7f29b7b5f45d535268171f72a5ea3f599774551b27456fa81ef69d31e97798be07ffa2e
7
+ data.tar.gz: 4b0ce99c72b6283c403bf2658a935804559ae8c43ff08535799c689050ec2d52c53c2acac7cb3a3fe81f02679e14957f9f3e26ce9d9ed1bb8b729bcd1b531428
@@ -388,7 +388,7 @@ module Groundskeeper
388
388
  end
389
389
  end
390
390
 
391
- # rubocop:disable Metrics/MethodLength
391
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
392
392
  def update_deployed_issues
393
393
  tries = 0
394
394
 
@@ -397,13 +397,14 @@ module Groundskeeper
397
397
  )
398
398
 
399
399
  begin
400
- deployed_version = website.version
400
+ deployed_version = SemanticVersion.new(website.version)
401
+ current_version = SemanticVersion.new(version_file.current_version)
401
402
 
402
- raise VersionError unless deployed_version == ENV[TAG]
403
+ raise VersionError unless deployed_version.version == ENV[TAG]
403
404
 
404
405
  console.say("# deployment successful", :green)
405
- transition_remote_issues deployed_version
406
- announce_in_slack deployed_version
406
+ transition_remote_issues(deployed_version, current_version)
407
+ announce_in_slack deployed_version.version
407
408
  rescue VersionError
408
409
  tries += 1
409
410
  sleep 5
@@ -411,13 +412,13 @@ module Groundskeeper
411
412
  # :nocov:
412
413
  console.say(
413
414
  "something went wrong: expected version #{ENV.fetch(TAG, nil)}, " \
414
- "found version #{deployed_version} instead",
415
+ "found version #{deployed_version.version} instead",
415
416
  :red
416
417
  )
417
418
  # :nocov:
418
419
  end
419
420
  end
420
- # rubocop:enable Metrics/MethodLength
421
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
421
422
 
422
423
  # :nocov:
423
424
  def release_version
@@ -426,10 +427,16 @@ module Groundskeeper
426
427
  end
427
428
  # :nocov:
428
429
 
429
- # rubocop:disable Metrics/MethodLength
430
- def transition_remote_issues(version)
431
- version_name = "#{repository.name} #{version}"
432
- deployed_issues = jira.fetch_issues_by_fix_version(version_name)
430
+ # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
431
+ def transition_remote_issues(version, current_version)
432
+ version_int = version.minor.to_i
433
+ current_version_int = current_version.minor.to_i
434
+ deployed_issues = []
435
+ ((current_version_int + 1)..version_int).each do |version_to_deploy|
436
+ version_name = "#{repository.name} 0.#{version_to_deploy}.0"
437
+ deployed_issues.append(jira.fetch_issues_by_fix_version(version_name))
438
+ end
439
+
433
440
  action = if self.class.stage == PRODUCTION
434
441
  Jira::DEPLOY_TO_PRODUCTION
435
442
  else
@@ -441,7 +448,7 @@ module Groundskeeper
441
448
  )
442
449
  jira.transition_remote_issues(action, deployed_issues)
443
450
  end
444
- # rubocop:enable Metrics/MethodLength
451
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
445
452
 
446
453
  def announce_in_slack(deployed_version)
447
454
  slack.send_message(
@@ -47,5 +47,9 @@ module Groundskeeper
47
47
 
48
48
  minor == other_minor && patch > other_version.patch
49
49
  end
50
+
51
+ def version
52
+ "#{major}.#{minor}.#{patch}"
53
+ end
50
54
  end
51
55
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Groundskeeper
4
- VERSION = "0.31.0"
4
+ VERSION = "0.32.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groundskeeper-bitcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.0
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RADD
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-16 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jira-ruby