pkgr 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/pkgr +56 -0
- data/lib/pkgr/version.rb +1 -1
- metadata +5 -2
data/bin/pkgr
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'pkgr/cli'
|
5
|
+
|
6
|
+
OPTIONS = {:dir => "./", :ref => "master", :reuse => false}
|
7
|
+
|
8
|
+
option_parser = OptionParser.new do |opts|
|
9
|
+
opts.banner = <<BANNER
|
10
|
+
* Description
|
11
|
+
pkgr #{Pkgr::VERSION} - Package Rails apps effortlessly.
|
12
|
+
* Usage
|
13
|
+
pkgr --uri GIT_REPOSITORY --config database.yml:http://path/to/database.yml --config ...
|
14
|
+
BANNER
|
15
|
+
|
16
|
+
opts.separator ""
|
17
|
+
opts.separator "* Common options"
|
18
|
+
opts.on("--uri=", "Sets the Git repository URI (FILE, HTTP, SSH, GIT, etc.) [required]") do |v|
|
19
|
+
OPTIONS[:uri] = v
|
20
|
+
end
|
21
|
+
opts.on("-c=", "--config=", "Download a configuration file into the config/ folder of the app (HTTP or FILE URIs)") do |v|
|
22
|
+
OPTIONS[:config_files] ||= []
|
23
|
+
OPTIONS[:config_files] << v
|
24
|
+
end
|
25
|
+
opts.on("-b=", "--bump=", "Sets the app version [required]") do |v|
|
26
|
+
OPTIONS[:version] = v
|
27
|
+
end
|
28
|
+
opts.on("-n=", "--name=", "Sets the app name [optional]") do |v|
|
29
|
+
OPTIONS[:name] = v
|
30
|
+
end
|
31
|
+
opts.on("--ref=", "Sets the git reference to checkout [default=#{OPTIONS[:ref]}]") do |v|
|
32
|
+
OPTIONS[:ref] = v
|
33
|
+
end
|
34
|
+
opts.on("--host=", "Sets the build machine hostname. If none, the process will stop just before building the package.") do |v|
|
35
|
+
OPTIONS[:host] = v
|
36
|
+
end
|
37
|
+
|
38
|
+
opts.separator ""
|
39
|
+
opts.separator "* Other"
|
40
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
41
|
+
puts opts
|
42
|
+
exit
|
43
|
+
end
|
44
|
+
opts.on_tail("--version", "Show version") do
|
45
|
+
puts Pkgr::VERSION
|
46
|
+
exit
|
47
|
+
end
|
48
|
+
end.parse!
|
49
|
+
|
50
|
+
begin
|
51
|
+
cli = Pkgr::CLI.new(OPTIONS)
|
52
|
+
cli.run
|
53
|
+
rescue Pkgr::CLI::Error, StandardError => e
|
54
|
+
puts e.message
|
55
|
+
puts e.backtrace if $DEBUG
|
56
|
+
end
|
data/lib/pkgr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pkgr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -46,7 +46,8 @@ dependencies:
|
|
46
46
|
description: Package your Rails apps as debian packages
|
47
47
|
email:
|
48
48
|
- cyril.rohr@gmail.com
|
49
|
-
executables:
|
49
|
+
executables:
|
50
|
+
- pkgr
|
50
51
|
extensions: []
|
51
52
|
extra_rdoc_files:
|
52
53
|
- LICENSE
|
@@ -78,6 +79,8 @@ files:
|
|
78
79
|
- lib/pkgr.rb
|
79
80
|
- LICENSE
|
80
81
|
- README.md
|
82
|
+
- !binary |-
|
83
|
+
YmluL3BrZ3I=
|
81
84
|
homepage: http://github.com/crohr/pkgr
|
82
85
|
licenses: []
|
83
86
|
post_install_message:
|