zewo-dev 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/lib/zewo/version.rb +1 -1
  4. data/lib/zewo.rb +43 -0
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7192e2a223a12f587af231c2d94e7667a31c5dc8
4
- data.tar.gz: f8a90e3eb745687e03c6dae62d9202db334859a0
3
+ metadata.gz: 7caa55d8307364a926dd47f27e3572dd58dc63bd
4
+ data.tar.gz: cad32cc0e839e4182b939f0bb7fee2bd5c85a7ea
5
5
  SHA512:
6
- metadata.gz: 1f99e518f9b757950d0da68e944be3c1f8eb81f44db64c2c5e059e4824210b39630084636b985d485ba10c64edf72e9664ac3a22baaeb2d26186967d30348715
7
- data.tar.gz: 0aa9d0a54d64824f3faf0b0b64e747042643647d1e86e73790bfd3082ff3c21073b81cc1afade3c090ca1865736f8a09e8c42f14720860e44db40f145c2e7645
6
+ metadata.gz: 3421d0b33a4b17f157cd1fe00e35722b02756fc0d5f17b5529b437dad527ed7374da56048a081b18cd7e7cb36d8bd0b547937af4cdf6bc267d4f0c08c3a54593
7
+ data.tar.gz: 6abf42351c179f663a67ee3bf01d421151c7d7bc00ed18d3284142fea767790ea8a546e66f457a11106de9578e562558a9cadff13a586fc860af78fd1482811e
data/README.md CHANGED
@@ -3,7 +3,7 @@ zewo-dev
3
3
 
4
4
  `zewo-dev` is a tool to make developing Zewo modules and tracking their status easier.
5
5
 
6
- The tool manages **only** modules including a `Package.swift` file, but checks out all the repositories in the Zewo organisation.
6
+ The tool manages **only** modules including a `Package.swift` file, but checks out all the repositories in the Zewo organization.
7
7
 
8
8
  ## Installing
9
9
  * Tool is built using Ruby.
@@ -12,7 +12,7 @@ The tool manages **only** modules including a `Package.swift` file, but checks o
12
12
  `gem install zewo-dev`
13
13
 
14
14
  ## Getting started
15
- Create a directory in which you want to put all Zewo repositories, and move into it. Then run `zewo init`. This will clone all repositories in the Zewo organisation.
15
+ Create a directory in which you want to put all Zewo repositories, and move into it. Then run `zewodev init`. This will clone all repositories in the Zewo organization.
16
16
 
17
17
  ```
18
18
  mkdir zewo-development
@@ -34,4 +34,4 @@ Lastly, you'll be prompted to push your changes.
34
34
  `zewodev pull` pulls changes from all repositories
35
35
 
36
36
  ## Unit testing
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.
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
@@ -1,3 +1,3 @@
1
1
  module Zewo
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
data/lib/zewo.rb CHANGED
@@ -270,6 +270,49 @@ module Zewo
270
270
  end
271
271
  end
272
272
 
273
+ desc :tag, 'Tags all code repositories with the given tag. Asks to confirm for each repository'
274
+ def tag(tag)
275
+ each_code_repo do |repo|
276
+ shouldTag = prompt("create tag #{tag} in #{repo.name}?")
277
+ if shouldTag
278
+ silent_cmd("cd #{repo.name} && git tag #{tag}")
279
+ puts repo.name.green
280
+ end
281
+ end
282
+ end
283
+
284
+ desc :checkout, 'Checks out all code repositories to the latest patch release for the given tag/branch'
285
+ option :branch
286
+ option :tag
287
+ def checkout()
288
+ if !options[:branch] && !options[:tag]
289
+ puts 'Need to specify either --tag or --branch'.red
290
+ return
291
+ end
292
+
293
+ each_code_repo do |repo|
294
+ matched = nil
295
+
296
+ if options[:tag]
297
+ matched = `cd #{repo.name} && git tag`
298
+ .split("\n")
299
+ .select { |t| t.start_with?(options[:tag]) }
300
+ .last
301
+ end
302
+
303
+ if options[:branch]
304
+ matched = options[:branch]
305
+ end
306
+
307
+ if matched
308
+ silent_cmd("cd #{repo.name} && git checkout #{matched}")
309
+ puts "Checked out #{repo.name} at #{matched}".green
310
+ else
311
+ puts "No matching specifiers for #{repo.name}".red
312
+ end
313
+ end
314
+ end
315
+
273
316
  desc :pull, 'git pull on all repos'
274
317
  def pull
275
318
  print "Updating all repositories..." + "\n"
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.7
4
+ version: 0.2.8
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-22 00:00:00.000000000 Z
11
+ date: 2016-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj