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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bdbb0bfa35836490090703ca0c1fc24367de88d4d6539ee09b3424090d4c46f
|
4
|
+
data.tar.gz: 7a2838eaf1a764e643c8290bb7d921cac80d042b21f9ba2cf697af9f737f3065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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,
|
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
|
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
|
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,
|
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) }
|
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.
|
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
|
11
|
+
date: 2024-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|