firespring_dev_commands 2.3.0.pre.alpha.1 → 2.3.0.pre.alpha.2

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: 778ff67e973ecdf910d950b09b6eaae4115696dd611d40681edf117056df6785
4
- data.tar.gz: cee645397957dcdba5122f3d569cc5800a70b4c6e4695010acd931dba83092d7
3
+ metadata.gz: 0bdbb0bfa35836490090703ca0c1fc24367de88d4d6539ee09b3424090d4c46f
4
+ data.tar.gz: 7a2838eaf1a764e643c8290bb7d921cac80d042b21f9ba2cf697af9f737f3065
5
5
  SHA512:
6
- metadata.gz: 77939ad333d8c4ac77623c165ca0541d225361276ac3411dc769cd4dbd469b3543a0b255ce92ba1d8d89a019942f0b0aa6266ffa13321454ae42d6a786592a9d
7
- data.tar.gz: 0a86f1791da0270e490ce8fd0cbe6d81ca4fce991db527e900f6ccfbe9aae157bb16177a3ca285ee389c563cf6c2cf7396862e2d14f1e941cf679d77aeaaaf0f
6
+ metadata.gz: 163658ffa6d4a2b493abe51905aae489ec1955670f6bfc0da65cf81802cfa08a5b833b732d966a0e2f74fd454817c7086cbabfbf3d3998cc51619218cfde5f49
7
+ data.tar.gz: 8e107996750229780c086c3cf40d54ce996d25d84d662193575851e2f04a625469d9e8e163c38d4395034ffbb7fe6d61e7754bd8cc027b7508adbbd96ff016c2
@@ -185,7 +185,7 @@ module Dev
185
185
  end
186
186
 
187
187
  # Checks out the given branch in all repositories with some additional formatting
188
- def checkout_all(branch, default_branch: nil)
188
+ def checkout_all(branch, default)
189
189
  @success = true
190
190
  puts
191
191
  puts "Checking out #{branch} in each repo".light_yellow if project_dirs.length > 1
@@ -194,7 +194,7 @@ module Dev
194
194
 
195
195
  repo_basename = File.basename(File.realpath(project_dir))
196
196
  puts Dev::Common.new.center_pad(repo_basename).light_green
197
- @success &= checkout(branch, default: default_branch, dir: project_dir)
197
+ @success &= checkout(branch, default, dir: project_dir)
198
198
  puts Dev::Common.new.center_pad.light_green
199
199
  end
200
200
  puts
@@ -203,9 +203,10 @@ module Dev
203
203
  end
204
204
 
205
205
  # Checks out the given branch in the given repo
206
+ # If the given branch isn't found, falls back to default branch, then staging, then main
206
207
  # Defaults to the current directory
207
208
  # optionally raise errors
208
- def checkout(branch, default: nil, dir: default_project_dir, raise_errors: false)
209
+ def checkout(branch, default, dir: default_project_dir, raise_errors: false)
209
210
  raise 'branch is required' if branch.to_s.strip.empty?
210
211
  return unless File.exist?(dir)
211
212
 
@@ -215,7 +216,8 @@ module Dev
215
216
  g = ::Git.open(dir)
216
217
  g.fetch('origin', prune: true)
217
218
 
218
- # If the branch we are checking out doesn't exist, check out either the staging branch or the main branch
219
+ # If the branch we are checking out doesn't exist,
220
+ # check out either the default branch, staging branch, or the main branch
219
221
  actual_branch = branch
220
222
  unless branch_exists?(dir, branch)
221
223
  actual_branch = [default, staging_branch, main_branch].uniq.find { |it| branch_exists?(dir, it) }
@@ -39,7 +39,7 @@ module Dev
39
39
  default = ENV['DEFAULT'].to_s.strip
40
40
  raise 'branch is required' if branch.empty?
41
41
 
42
- Dev::Git.new.checkout_all(branch, default_branch: default)
42
+ Dev::Git.new.checkout_all(branch, default)
43
43
  end
44
44
 
45
45
  task co: %w(init checkout) do
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '2.3.0.pre.alpha.1'.freeze
9
+ VERSION = '2.3.0.pre.alpha.2'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.pre.alpha.1
4
+ version: 2.3.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-26 00:00:00.000000000 Z
11
+ date: 2024-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport