ian 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/ian.rb +1 -1
- data/lib/ian/control.rb +1 -1
- data/lib/ian/packager.rb +14 -14
- data/lib/ian/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eef0a9d2b8f8eb7b3d6191ef394330eb726e3f47
|
4
|
+
data.tar.gz: 5af7d2748dc79cc958d96d2cd326030b198a9759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e6d5176b2ba6e214718ed21e8f600b29d462868b6cee58389a87108822c167d30764a663c9eed54183eaf5b8cbb9a675abe4216490c437081c99dcc3a88b85
|
7
|
+
data.tar.gz: 094b451d2f8bb9f5ef2999df088bae4636ef85d03f8ed0127b85dd0a58e6a986a976d2f6d9e37201725a681b30f118c07491db7c41a277a41d96ceac60d9d1f2
|
data/README.md
CHANGED
@@ -9,6 +9,12 @@ bundler.
|
|
9
9
|
It is intended to be helpful when integrating other build tools/systems and
|
10
10
|
with CI/CD.
|
11
11
|
|
12
|
+
## Requirements
|
13
|
+
|
14
|
+
* dpkg
|
15
|
+
* fakeroot
|
16
|
+
* rsync
|
17
|
+
|
12
18
|
## Installation
|
13
19
|
|
14
20
|
Add this line to your application's Gemfile:
|
@@ -122,6 +128,7 @@ Need help with the control files? Try these links:
|
|
122
128
|
- [ ] add commands to help with releasing new versions/tagging
|
123
129
|
- [ ] allow packaging past versions from git tags
|
124
130
|
- [ ] add option for semver enforcement
|
131
|
+
- [ ] remove rsync dependency
|
125
132
|
|
126
133
|
## Development
|
127
134
|
|
data/lib/ian.rb
CHANGED
data/lib/ian/control.rb
CHANGED
data/lib/ian/packager.rb
CHANGED
@@ -4,9 +4,10 @@ require 'fileutils'
|
|
4
4
|
module Ian
|
5
5
|
class Packager
|
6
6
|
def initialize(path, ctrl, log)
|
7
|
-
@path = path
|
7
|
+
@path = path # this is the source path that the files to package are copied from
|
8
8
|
@ctrl = ctrl
|
9
|
-
@log
|
9
|
+
@log = log
|
10
|
+
@dir = nil # this is the tmp directory that the package is built from
|
10
11
|
end
|
11
12
|
|
12
13
|
# run the packager
|
@@ -44,8 +45,8 @@ module Ian
|
|
44
45
|
# move extraneous stuff like README and CHANGELOG to /usr/share/doc
|
45
46
|
def move_root_files
|
46
47
|
docs = "#{@dir}/usr/share/docs/#{pkgname}"
|
47
|
-
files =
|
48
|
-
|
48
|
+
files = Dir.entries(@dir).select {|f| !File.directory?(f) }
|
49
|
+
return unless files.any?
|
49
50
|
|
50
51
|
FileUtils.mkdir_p(docs)
|
51
52
|
|
@@ -66,7 +67,7 @@ module Ian
|
|
66
67
|
FileUtils.chmod(0755, Ian.debpath(@dir))
|
67
68
|
|
68
69
|
pkg = File.join(pkgdir, "#{pkgname}.deb")
|
69
|
-
output = %x[dpkg-deb -b #{@dir} #{pkg}]
|
70
|
+
output = %x[fakeroot dpkg-deb -b #{@dir} #{pkg}]
|
70
71
|
|
71
72
|
return [$?.success?, pkg, output]
|
72
73
|
end
|
@@ -96,19 +97,18 @@ module Ian
|
|
96
97
|
end
|
97
98
|
|
98
99
|
def excludes
|
99
|
-
files
|
100
|
+
files = %w[.git .gitignore .ianignore]
|
101
|
+
ignorefile = File.join(@path, ".ianignore")
|
100
102
|
|
101
|
-
return files unless File.exist?(
|
102
|
-
File.read(File.join(@path, ".ianignore")).lines.each do |ign|
|
103
|
-
next if ign.start_with? "#"
|
104
|
-
|
105
|
-
ign.chomp!
|
106
|
-
igns = Dir["#{@path}/#{ign}"]
|
107
|
-
next if igns.empty?
|
103
|
+
return files unless File.exist?(ignorefile)
|
108
104
|
|
109
|
-
|
105
|
+
File.read(ignorefile).lines.each do |ign|
|
106
|
+
next if ign.start_with? "#"
|
107
|
+
files << ign.chomp
|
110
108
|
end
|
111
109
|
|
110
|
+
files.each {|f| @log.debug "Ignoring file: %s" % f }
|
111
|
+
|
112
112
|
files
|
113
113
|
end
|
114
114
|
|
data/lib/ian/version.rb
CHANGED