aptly-watcher 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.
- checksums.yaml +4 -4
- data/lib/aptly/watcher/aptly_shim.rb +9 -9
- data/lib/aptly/watcher/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: 4aad45eba38cd86eeed010e57bf5badec8173f82
|
4
|
+
data.tar.gz: f9a3764bd2d38f9e0b3c7ea10329a1f152add3d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11f8130fd522beb170524ced1a20100f1a05fd3f20d51bca24494ac8d3d14378f6fad608b55f6aec9c5896d98b18e7ba646f922df09ae3ab9b6339a44e618a55
|
7
|
+
data.tar.gz: f7e3b07cdd5921dfba0dc6aa285370b7e20e8e8417d8549b626af89506edce75c5035633f494008f364b2f3313a15f72085f4665998666ed97636f67fa962df7
|
@@ -12,16 +12,16 @@ module Aptly
|
|
12
12
|
def create
|
13
13
|
repo_list = `aptly repo list --raw`
|
14
14
|
|
15
|
+
# create a repo for each component
|
15
16
|
@components.each do |repo|
|
16
|
-
next if repo_list.include? repo
|
17
|
-
output = `aptly repo create #{distrib} #{config} #{component(repo)} #{repo}`
|
17
|
+
next if repo_list.include? repo # avoid raising an error
|
18
|
+
output = `aptly repo create #{distrib} #{config} #{component(repo)} #{repo} 2>&1`
|
18
19
|
raise StandardError, "Failed to create repo #{repo}\n#{output}" unless $?.success?
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
output = `aptly publish repo #{config} #{distrib} #{component(:all)} #{component(:all, ' ')}`
|
22
|
+
# publish the repos for the first time (empty)
|
23
|
+
unless `aptly publish list --raw`.include? @name # avoid raising an error
|
24
|
+
output = `aptly publish repo #{config} #{distrib} #{component(:all)} #{@components.join(' ')} 2>&1`
|
25
25
|
raise StandardError, "Failed to publish #{@name} for the first time\n#{output}" unless $?.success?
|
26
26
|
end
|
27
27
|
end
|
@@ -30,7 +30,7 @@ module Aptly
|
|
30
30
|
# TODO: check if the file has already been added
|
31
31
|
# TODO: check that the file is a Debian package
|
32
32
|
output = `aptly repo add -remove-files=true #{config} #{repo} #{path} 2>&1`
|
33
|
-
raise StandardError, "Failed to add #{path} to #{repo
|
33
|
+
raise StandardError, "Failed to add #{path} to #{repo}\n#{output}" unless $?.success?
|
34
34
|
end
|
35
35
|
|
36
36
|
def publish
|
@@ -39,8 +39,8 @@ module Aptly
|
|
39
39
|
|
40
40
|
private
|
41
41
|
|
42
|
-
def component(repo
|
43
|
-
repo = @components.join(
|
42
|
+
def component(repo)
|
43
|
+
repo = @components.join(',') if repo == :all
|
44
44
|
"-component=#{repo}"
|
45
45
|
end
|
46
46
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptly-watcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert McLeod
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.4.
|
125
|
+
rubygems_version: 2.4.8
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Watches folders and adds them to their relative aptly repository
|