ian 0.5.3 → 0.6.0
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.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/bin/ian +31 -4
- data/lib/ian.rb +1 -1
- data/lib/ian/control.rb +10 -0
- data/lib/ian/packager.rb +1 -7
- data/lib/ian/utils.rb +1 -1
- data/lib/ian/version.rb +1 -1
- 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: f6532da46f52c70d5a917e8e9692e850301accee
|
4
|
+
data.tar.gz: c443a6e802103e07bb71fd94b1836cc78147ad3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f51e2f383da45c71eff99c4bfb3d517a985677f12d850162690e9b6228e8d0e118cdd076c95c2c83e454fbc21fa58c501935b08c78ce7d2f4cac484da02a3e06
|
7
|
+
data.tar.gz: 87fa0d84ec6a91aff53c5f6f2562c4cc25c12c7a31c7811058af8de729df6290b1ae37f246328fc3e1ce2e85117e3d03e146779447834dd054db93a783dc26ea
|
data/README.md
CHANGED
@@ -105,6 +105,17 @@ version (prepending it with a `v`) and then builds the package as above.
|
|
105
105
|
This does the same as before, however first it will take the version number in
|
106
106
|
the argument, write it to the control file and commit the control file.
|
107
107
|
|
108
|
+
**Push a package**
|
109
|
+
|
110
|
+
Push a package to remote repo by adding a file called `.ianpush` in the repo root
|
111
|
+
containing a command to run to push the file up. E.G:
|
112
|
+
|
113
|
+
package_cloud push my/repo/debian/jessie
|
114
|
+
|
115
|
+
Then when you run `ian push` it will run that command and tack the package for
|
116
|
+
the current version on the end, warning you if you didn't run `ian pkg` yet. You
|
117
|
+
can also give the package name as an argument like `ian push pkg/the-pkg_0.0.1_all.deb`.
|
118
|
+
|
108
119
|
**Show versions**:
|
109
120
|
|
110
121
|
Show the versions by using this command:
|
@@ -129,6 +140,7 @@ Need help with the control files? Try these links:
|
|
129
140
|
- [ ] allow packaging past versions from git tags
|
130
141
|
- [ ] add option for semver enforcement
|
131
142
|
- [ ] remove rsync dependency
|
143
|
+
- [ ] add PUSH command to a server via rsync (lol)
|
132
144
|
|
133
145
|
## Development
|
134
146
|
|
data/bin/ian
CHANGED
@@ -64,6 +64,32 @@ Slop.parse help: true do
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
command :push do
|
68
|
+
description "Push the latest debian package up"
|
69
|
+
|
70
|
+
run do |opts, args|
|
71
|
+
check_initialized!
|
72
|
+
if !File.exist? ".ianpush"
|
73
|
+
puts "You need to specify a command to run in a file called .ianpush"
|
74
|
+
exit 1
|
75
|
+
end
|
76
|
+
|
77
|
+
cmd = File.read(File.join(IAN_DIR, ".ianpush")).chomp
|
78
|
+
c = Ian.control(IAN_DIR)
|
79
|
+
|
80
|
+
if args.first
|
81
|
+
cmd += " "+args.first
|
82
|
+
else
|
83
|
+
fn = c.pkgname+".deb"
|
84
|
+
path = File.join(IAN_DIR, "pkg", fn)
|
85
|
+
abort "Package not yet built: #{fn}" unless File.exist?(path)
|
86
|
+
cmd += " "+ path
|
87
|
+
end
|
88
|
+
|
89
|
+
system cmd
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
67
93
|
command :set do
|
68
94
|
description "Modify the Debian control file"
|
69
95
|
|
@@ -110,7 +136,7 @@ Slop.parse help: true do
|
|
110
136
|
command :deps do
|
111
137
|
description "Print dependencies for this package"
|
112
138
|
|
113
|
-
run do |opts, args|
|
139
|
+
run do |opts, args|
|
114
140
|
check_initialized!
|
115
141
|
|
116
142
|
ctrl = Ian.control(IAN_DIR)
|
@@ -140,18 +166,19 @@ Slop.parse help: true do
|
|
140
166
|
check_initialized!
|
141
167
|
|
142
168
|
ctrl = Ian.control(IAN_DIR)
|
169
|
+
ctrlpath = Ian.ctrlpath(IAN_DIR)
|
143
170
|
version = ctrl[:version]
|
144
171
|
|
145
172
|
if args.any?
|
146
173
|
version = args.first
|
147
|
-
version.gsub
|
174
|
+
version = version.gsub(/^v/, '')
|
148
175
|
log.info "Releasing v#{version}"
|
149
176
|
log.info "Updating control file"
|
150
177
|
ctrl[:version] = version
|
151
|
-
|
178
|
+
Ian::Control.save(ctrl, ctrlpath)
|
152
179
|
|
153
180
|
log.info "Committing control file"
|
154
|
-
system "git add #{
|
181
|
+
system "git add #{ctrlpath}"
|
155
182
|
system "git commit -m 'releasing v#{version}'"
|
156
183
|
|
157
184
|
end
|
data/lib/ian.rb
CHANGED
data/lib/ian/control.rb
CHANGED
@@ -19,6 +19,16 @@ module Ian
|
|
19
19
|
@fields[field]
|
20
20
|
end
|
21
21
|
|
22
|
+
def pkgname
|
23
|
+
parts = [
|
24
|
+
@fields[:package],
|
25
|
+
@fields[:version],
|
26
|
+
@fields[:arch]
|
27
|
+
]
|
28
|
+
|
29
|
+
"%s_%s_%s" % parts
|
30
|
+
end
|
31
|
+
|
22
32
|
# deletes a field from the hash
|
23
33
|
def delete(field)
|
24
34
|
field.to_sym if field.is_a? String
|
data/lib/ian/packager.rb
CHANGED
data/lib/ian/utils.rb
CHANGED
data/lib/ian/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ian
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert McLeod
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|