dockit 2.1.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +1 -1
  3. data/README.md +1 -1
  4. data/VERSION +1 -1
  5. data/lib/dockit/cli.rb +14 -9
  6. metadata +2 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc496e5bf8f5c912f8a3105e3db791fe7c57ea50
4
- data.tar.gz: cd44a787027339c6070ee8573eb060385cc0e9e4
3
+ metadata.gz: 45cc314a486066a7baf975bf2a3daa35a155f270
4
+ data.tar.gz: ee77b112660f1afc6e00ed451e9a1cbd41dc2ef5
5
5
  SHA512:
6
- metadata.gz: a3e30d0251b5df21698ffca79376e75e3362d5da8b0ba2e29a5aebb9d8ad715ee4b3ebaabb4d56e60308b0ef22eca3a46a92f14ab8d4ddc04113b457519fe671
7
- data.tar.gz: f30dbea4b6fcc6fa5b053840faa251b7fa22a777672d282fa19919e29c2b290edd87a35ac2d4e91d7090a872524cfb0a4d379f41358903712361decbe3cc786e
6
+ metadata.gz: 60b2561d45ab2edd536270781254430cc209b5210797ad845ff057246f0bbe1ca54fe492630776bff6cbb59dd285ed1645b7568dd026516c247053aa682cc88b
7
+ data.tar.gz: 4337a64438d9495e9f8b97f5688466ccf75d912713e290c1bec90275bda66f32f9629100b03f2985444fcfacd3db4a74a3796129c93d2793eaa9d69539ddfc65
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  FROM cybercode/alpine-ruby:2.3
2
- ENV DOCKER_VERSION=1.11.1 BIN=/usr/local/bin/docker
2
+ ENV DOCKER_VERSION=1.11.2 BIN=/usr/local/bin/docker
3
3
 
4
4
  RUN apk --update add curl ruby-json && curl -sSL -o $BIN \
5
5
  https://get.docker.com/builds/Linux/x86_64/docker-$DOCKER_VERSION \
data/README.md CHANGED
@@ -79,7 +79,7 @@ The `dockit.rb` file can be used to add new subcommands to the cli on a project-
79
79
 
80
80
  - `invoke_default(service)` will run the same-named (or specified) dockit command on the specified service.
81
81
  - `invoke_service(service)` will run the same-named (or specifed) subcommand from the `Dockit.rb` for the specified service.
82
- - `invoke_git(service, gem=false)` will run the same-name (or specifed) subcommand from the `Dockit.rb` for the specified service after checking out the git repository for the service as a gzip archive to `repos.tar.tz`. By default it used the `master` branch. If `gem` is true, it will checkout the gemfiles as a separate archive (`gemfiles.tar.gz`). Note that the `repos` key must be set in the services yaml file.
82
+ - `invoke_git(service)` will run the same-name (or specifed) subcommand from the `Dockit.rb` for the specified service after checking out the git repository for the service as a gzip archive to `repos.tar.tz`. By default it used the `master` branch. Note that the `repos` key must be set in the services yaml file.
83
83
 
84
84
  For example:
85
85
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 3.0.0
@@ -27,8 +27,8 @@ class SubCommand < Thor
27
27
  end
28
28
 
29
29
  # export git repository before running default command
30
- def invoke_git(service, gem=false)
31
- invoke_default service, cmd: 'git-build', opts: { gem: gem || options.gem }
30
+ def invoke_git(service)
31
+ invoke_default service, cmd: 'git-build'
32
32
  end
33
33
  end
34
34
  end
@@ -182,9 +182,11 @@ class Default < Thor
182
182
  end
183
183
  end
184
184
 
185
- desc 'git-build', 'build from git (gem) repository'
185
+ desc 'git-build', 'build from git repository'
186
186
  option :branch, desc: '<tree-ish> git reference', default: GIT_BRANCH
187
- option :package, type: :boolean, desc: "update package config export"
187
+ option :package, type: :boolean, desc: 'update package config export'
188
+ option :tag, type: :boolean,
189
+ desc: 'create local tag file ".branch" with branch name'
188
190
  long_desc <<-LONGDESC
189
191
  Dockit.yaml keys used:
190
192
  \x5 repos_path: optional treeish path
@@ -196,7 +198,7 @@ class Default < Thor
196
198
 
197
199
  The '--package' option will export the files in the :package key in
198
200
  Dockit.yaml separately to 'package.tar.gz'. This is docker best practice
199
- for building rails apps.
201
+ for building rails apps, and works equally well for nodejs.
200
202
 
201
203
  *Breaking change (2.0)* ~branch~ now defaults to the *current* local
202
204
  branch, not ~master~.
@@ -223,14 +225,17 @@ class Default < Thor
223
225
  exit 1
224
226
  end
225
227
 
226
- archive = options.gem ? 'gemfile.tar.gz' : 'package.tar.gz'
227
- say "-> #{archive}", :green
228
- export(repos, treeish, archive, packages)
228
+ archive = ''
229
+ say '-> package.tar.gz', :green
230
+ export(repos, treeish, archive, 'package.tar.gz')
229
231
  end
230
232
 
231
- say "-> repos.tar.gz", :green
233
+ say '-> repos.tar.gz', :green
232
234
  export(repos, treeish, 'repos.tar.gz')
233
235
 
236
+ say "Creating '.branch' tag file (#{options.branch})", :green
237
+ File.write('.branch', "#{options.branch}\n")
238
+
234
239
  s.build
235
240
  end
236
241
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Frankel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-05 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -207,4 +207,3 @@ test_files:
207
207
  - spec/dockit/simple.yaml
208
208
  - spec/dockit_spec.rb
209
209
  - spec/spec_helper.rb
210
- has_rdoc: