s3repo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/s3repo +14 -5
  3. data/lib/s3repo/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e1bc9926cf762452f2d9a97ce3285aff708d2fd
4
- data.tar.gz: 4b8c64c255cf57d2d42f542a3af02d0b42cfb320
3
+ metadata.gz: 112c8a99e461d482e62c3b4e742b22f3ddd3a97d
4
+ data.tar.gz: 9e8da23f00dce76151f74723c077151b56a5618e
5
5
  SHA512:
6
- metadata.gz: f9f8031ab8c1ccdd6cfe815028595b7cceb82084f1cfe7c8ef70bf4bfdf6d7cd97ebb986d87b923bc6b383929df9738529407399b03a9b59905280ed1047f855
7
- data.tar.gz: 7f75e8489ecbc9dd87ea43717ae0dec64c034602731a472e45a80a6ac890ab0161f29e6134223c8bcfaa0ef875f7a9a4650c8cdf22294b6b697df4d54acae90f
6
+ metadata.gz: c4abb7f76cb5f4458f1f220fb86df3bd30ed77149281f22259cf4b11d8475ab2700deccb3f7d0e3f51e5d9a060d249f0dc3c81664d7847c05ad6a4fe009616bd
7
+ data.tar.gz: 41b56c96ae04890d7395b9d7b504ebb646b6306304df1f072c8227ca33e2f67b7ee609cd7fb176594e46e634a1dbba4b932249e17b9885e61a4f175a620909bd
data/bin/s3repo CHANGED
@@ -3,26 +3,35 @@
3
3
  require 's3repo'
4
4
  require 'mercenary'
5
5
 
6
+ def find(pattern, limits)
7
+ Dir.glob(pattern).select { |x| !limits || limits.include?(File.dirname(x)) }
8
+ end
9
+
6
10
  Mercenary.program(:s3repo) do |p|
7
11
  p.version S3Repo::VERSION
8
12
  p.description 'Package management tool for Archlinux repos'
9
13
  p.syntax 's3repo <subcommand> [args]'
10
14
 
11
15
  p.command(:build) do |c|
12
- c.syntax 'build'
16
+ c.syntax 'build [package...]'
13
17
  c.description 'Build package files from PKGBUILDs'
14
18
 
15
- c.action do
16
- S3Repo.new.build_packages Dir.glob('*/PKGBUILD')
19
+ c.action do |args, _|
20
+ S3Repo.new.build_packages find('*/PKGBUILD', args)
17
21
  end
18
22
  end
19
23
 
20
24
  p.command(:upload) do |c|
21
- c.syntax 'upload'
25
+ c.syntax 'upload [package...]'
22
26
  c.description 'Upload packages to repo'
23
27
 
24
28
  c.action do
25
- S3Repo.new.add_packages Dir.glob('*/*.pkg.tar.xz')
29
+ S3Repo.new.add_packages find('*/*.pkg.tar.xz', args)
26
30
  end
27
31
  end
32
+
33
+ p.action do
34
+ puts p
35
+ exit 1
36
+ end
28
37
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define version
3
3
  module S3Repo
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker