zewo-dev 0.2.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -6
- data/lib/zewo/version.rb +1 -1
- data/lib/zewo.rb +8 -61
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e57b241df460eac8a99bc49c36848d14d8e78979
|
4
|
+
data.tar.gz: aa139705cf0e9aa4c03893e6ca53a25c1aa66c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ac8e6d511e800d0dc4cf4f2cf45dd81033a970570ddd09a9144fe61fcf1c288dcfad8d3e7e939ac60bf902bd8f187d9f7987e327ba678100bb4f9e3365acebd
|
7
|
+
data.tar.gz: dfeb4617151557b984fae1bab0ff13c96c82ebeb26bef19c124081715a5daabdfc14375eace34bb7eed7218d1684873898c646ee2fe2ac7b65e315d3ab740797
|
data/README.md
CHANGED
@@ -28,14 +28,10 @@ Run `zewodev make_projects` to generate Xcode projects for all Swift modules. Ev
|
|
28
28
|
## Checking status
|
29
29
|
`zewodev status` will show you the current status of all the repositories. Red means you have uncommitted changes, green means there are no uncommitted changes.
|
30
30
|
|
31
|
-
|
32
|
-
## Committing
|
33
|
-
`zewodev commit MESSAGE` will take you through all repositories and perform `git add --all; git commit -am <MESSAGE>` after you've confirmed that the status of each repo looks ok. Commits are performed after you've confirmed **all** commits.
|
34
|
-
|
35
31
|
Lastly, you'll be prompted to push your changes.
|
36
32
|
|
37
|
-
##
|
38
|
-
`zewodev
|
33
|
+
## Pulling changes
|
34
|
+
`zewodev pull` pulls changes from all repositories
|
39
35
|
|
40
36
|
## Unit testing
|
41
37
|
If you create a folder called `Tests` in the same directory as your `Sources` directory, the tool will create a `<ModuleName>-tests` target and add the test files to that target.
|
data/lib/zewo/version.rb
CHANGED
data/lib/zewo.rb
CHANGED
@@ -234,12 +234,11 @@ module Zewo
|
|
234
234
|
end
|
235
235
|
|
236
236
|
def prompt(question)
|
237
|
-
printf "#{question} -
|
237
|
+
printf "#{question} - y/N: "
|
238
238
|
p = STDIN.gets.chomp
|
239
239
|
if p == 'y'
|
240
240
|
true
|
241
241
|
else
|
242
|
-
puts 'Aborting..'
|
243
242
|
false
|
244
243
|
end
|
245
244
|
end
|
@@ -282,77 +281,25 @@ module Zewo
|
|
282
281
|
puts 'Done!'
|
283
282
|
end
|
284
283
|
|
285
|
-
desc :
|
286
|
-
def
|
287
|
-
|
284
|
+
desc :make_projects, 'Makes Xcode projects for all modules'
|
285
|
+
def make_projects
|
286
|
+
each_code_repo(&:configure_xcode_project)
|
288
287
|
|
289
|
-
|
290
|
-
if uncommited_changes?(repo.name)
|
291
|
-
print "Uncommitted changes in #{repo.name}. Skipping.." + "\n"
|
292
|
-
next
|
293
|
-
end
|
294
|
-
print "Pushing #{repo.name}...".green + "\n"
|
295
|
-
silent_cmd("cd #{repo.name}; git push")
|
296
|
-
end
|
297
|
-
print 'Done!' + "\n"
|
288
|
+
each_code_repo(&:build_dependencies)
|
298
289
|
end
|
299
290
|
|
300
291
|
desc :init, 'Clones all Zewo repositories'
|
301
292
|
def init
|
293
|
+
use_ssh = prompt('Clone using SSH?')
|
294
|
+
|
302
295
|
each_repo_async do |repo|
|
303
296
|
print "Checking #{repo.name}..." + "\n"
|
304
297
|
unless File.directory?(repo.name)
|
305
298
|
print "Cloning #{repo.name}...".green + "\n"
|
306
|
-
silent_cmd("git clone #{repo.data['clone_url']}")
|
299
|
+
silent_cmd("git clone #{repo.data[use_ssh ? 'clone_url' : 'ssh_url']}")
|
307
300
|
end
|
308
301
|
end
|
309
302
|
puts 'Done!'
|
310
303
|
end
|
311
|
-
|
312
|
-
desc :build, 'Clones all Zewo repositories'
|
313
|
-
def build
|
314
|
-
each_code_repo do |repo|
|
315
|
-
unless File.directory?(repo.dir(repo.xcode_dirname))
|
316
|
-
puts "Skipping #{repo.name}. No Xcode project".yellow
|
317
|
-
end
|
318
|
-
puts "Building #{repo.name}...".green
|
319
|
-
|
320
|
-
if system("cd #{repo.dir(repo.xcode_dirname)}; set -o pipefail && xcodebuild -scheme \"#{repo.framework_target.name}\" -sdk \"macosx\" -toolchain \"/Library/Developer/Toolchains/swift-latest.xctoolchain\" | xcpretty") == false
|
321
|
-
puts "Error building. Maybe you're using the wrong Xcode? Try `sudo xcode-select -s /Applications/Xcode-Beta.app/Contents/Developer` if you have a beta-version of Xcode installed.".red
|
322
|
-
return
|
323
|
-
end
|
324
|
-
end
|
325
|
-
end
|
326
|
-
|
327
|
-
desc 'commit MESSAGE', 'Commits changes to all repos with the same commit message'
|
328
|
-
def commit(message)
|
329
|
-
return unless verify_branches
|
330
|
-
|
331
|
-
each_code_repo do |repo|
|
332
|
-
next unless uncommited_changes?(repo.name)
|
333
|
-
puts repo.name
|
334
|
-
puts '--------------------------------------------------------------'
|
335
|
-
if uncommited_changes?(repo.name)
|
336
|
-
system("cd #{repo.dir}; git status")
|
337
|
-
return unless prompt("Proceed with #{repo.name}?")
|
338
|
-
end
|
339
|
-
end
|
340
|
-
|
341
|
-
each_code_repo do |repo|
|
342
|
-
system("cd #{repo.dir}; git add --all; git commit -am \"#{message}\"")
|
343
|
-
puts "Commited #{repo.name}\n".green
|
344
|
-
end
|
345
|
-
|
346
|
-
if prompt('Push changes?'.red)
|
347
|
-
push
|
348
|
-
end
|
349
|
-
end
|
350
|
-
|
351
|
-
desc :make_projects, 'Makes projects'
|
352
|
-
def make_projects
|
353
|
-
each_code_repo(&:configure_xcode_project)
|
354
|
-
|
355
|
-
each_code_repo(&:build_dependencies)
|
356
|
-
end
|
357
304
|
end
|
358
305
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zewo-dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Ask
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|