chake 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +5 -0
- data/Rakefile +80 -2
- data/chake.spec.erb +46 -0
- data/lib/chake/node.rb +1 -1
- data/lib/chake/version.rb +1 -1
- data/spec/chake/backend/ssh_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb57e3e260528eaf17a91083a19f87a4285637ec
|
4
|
+
data.tar.gz: 1a322072a748b118893ef5848fd7bb8d67f55b84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db1227f01c1dc35ec10633fd7c17ebe0ba50b9e4bffecc73d80b8624a772fcc87f93bd8d7fc11f42e9feae5bb4d6dd189ff58e057c5c64e42fa9e6325243f92d
|
7
|
+
data.tar.gz: 48cd44d3be61043676425b479366c281d133c4741b4193923cd60a43f9870fd8c516b6c9b4127a4f3cd9031b5f30fa564bc39f2734cc765a3c3bfdbc772c014d
|
data/ChangeLog.md
ADDED
data/Rakefile
CHANGED
@@ -1,7 +1,85 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
|
3
|
-
task :
|
3
|
+
task :test do
|
4
4
|
sh 'rspec', '--color'
|
5
5
|
end
|
6
6
|
|
7
|
-
|
7
|
+
pkg = Gem::Specification.load('chake.gemspec')
|
8
|
+
|
9
|
+
task :build do
|
10
|
+
chdir 'pkg' do
|
11
|
+
sh 'gem2tgz', "#{pkg.name}-#{pkg.version}.gem"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'Create Debian source package'
|
16
|
+
task 'build:debsrc' => [:build] do
|
17
|
+
dirname = "#{pkg.name}-#{pkg.version}"
|
18
|
+
chdir 'pkg' do
|
19
|
+
sh 'gem2deb', '--no-wnpp-check', '-s', '-p', pkg.name, "#{dirname}.gem"
|
20
|
+
chdir dirname do
|
21
|
+
sh 'dpkg-buildpackage', '-S', '-us', '-uc'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
desc 'Create source RPM package'
|
27
|
+
task 'build:rpmsrc' => [:build, 'pkg/chake.spec']
|
28
|
+
|
29
|
+
file 'pkg/chake.spec' => 'chake.spec.erb' do |t|
|
30
|
+
require 'erb'
|
31
|
+
pkg = Gem::Specification.load('chake.gemspec')
|
32
|
+
template = ERB.new(File.read('chake.spec.erb'))
|
33
|
+
File.open(t.name, 'w') do |f|
|
34
|
+
f.puts(template.result(binding))
|
35
|
+
end
|
36
|
+
puts "Generated #{t.name}"
|
37
|
+
end
|
38
|
+
|
39
|
+
task 'build:all' => ['build:debsrc', 'build:rpmsrc']
|
40
|
+
|
41
|
+
task :obs => 'build:all' do
|
42
|
+
if !File.exist?('tmp/obs/home:terceiro:chake/chake')
|
43
|
+
mkdir_p 'tmp/obs'
|
44
|
+
chdir 'tmp/obs' do
|
45
|
+
sh 'osc', 'checkout', 'home:terceiro:chake', 'chake'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# remove old files
|
50
|
+
chdir 'tmp/obs/home:terceiro:chake/chake' do
|
51
|
+
Dir.glob('*').each do |f|
|
52
|
+
sh 'osc', 'remove', '--force', f
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# copy over new files
|
57
|
+
[
|
58
|
+
"pkg/#{pkg.name}-#{pkg.version}.tar.gz",
|
59
|
+
"pkg/#{pkg.name}.spec",
|
60
|
+
"pkg/#{pkg.name}_#{pkg.version}.orig.tar.gz",
|
61
|
+
"pkg/#{pkg.name}_#{pkg.version}-1.debian.tar.xz",
|
62
|
+
"pkg/#{pkg.name}_#{pkg.version}-1.dsc",
|
63
|
+
].each do |f|
|
64
|
+
sh 'cp', '--dereference', f, 'tmp/obs/home:terceiro:chake/chake'
|
65
|
+
end
|
66
|
+
|
67
|
+
# push new files to the repository
|
68
|
+
chdir 'tmp/obs/home:terceiro:chake/chake' do
|
69
|
+
Dir.glob('*').each do |f|
|
70
|
+
sh 'osc', 'add', f
|
71
|
+
end
|
72
|
+
sh 'osc', 'commit', '--message', "#{pkg.name}, version #{pkg.version}"
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
desc 'lists changes since last release'
|
78
|
+
task :changelog do
|
79
|
+
last_tag = `git tag | sort -V`.split.last
|
80
|
+
sh 'git', 'shortlog', last_tag + '..'
|
81
|
+
end
|
82
|
+
|
83
|
+
task :release => [:test, :obs]
|
84
|
+
|
85
|
+
task :default => :test
|
data/chake.spec.erb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
%define name <%= pkg.name %>
|
2
|
+
%define version <%= pkg.version %>
|
3
|
+
%define unmangled_version <%= pkg.version %>
|
4
|
+
%define release 1
|
5
|
+
|
6
|
+
Summary: <%= pkg.summary %>
|
7
|
+
Name: %{name}
|
8
|
+
Version: %{version}
|
9
|
+
Release: %{release}
|
10
|
+
Source0: %{name}-%{unmangled_version}.tar.gz
|
11
|
+
License: <%= pkg.license %>
|
12
|
+
Group: Development/Tools
|
13
|
+
Prefix: %{_prefix}
|
14
|
+
Vendor: <%= pkg.authors.first %> <<%= pkg.email.first %>>
|
15
|
+
Url: <%= pkg.homepage %>
|
16
|
+
BuildArch: noarch
|
17
|
+
BuildRequires: ruby, rubygem-rake, rubygem-bundler
|
18
|
+
Requires: ruby, rubygem-rake
|
19
|
+
|
20
|
+
%define gemdir <%= Gem.dir %>
|
21
|
+
%define gembuilddir %{buildroot}%{gemdir}
|
22
|
+
|
23
|
+
%description
|
24
|
+
<%= pkg.description %>
|
25
|
+
|
26
|
+
%prep
|
27
|
+
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}
|
28
|
+
|
29
|
+
%build
|
30
|
+
|
31
|
+
%install
|
32
|
+
%{__rm} -rf %{buildroot}
|
33
|
+
mkdir -p %{gembuilddir}
|
34
|
+
rake build
|
35
|
+
gem install --local --install-dir %{gembuilddir} --force pkg/*.gem
|
36
|
+
mkdir -p %{buildroot}/%{_bindir}
|
37
|
+
mv %{gembuilddir}/bin/* %{buildroot}/%{_bindir}
|
38
|
+
rmdir %{gembuilddir}/bin
|
39
|
+
|
40
|
+
%clean
|
41
|
+
rm -rf $RPM_BUILD_ROOT
|
42
|
+
|
43
|
+
%files
|
44
|
+
/usr/lib/chake
|
45
|
+
%{_bindir}/*
|
46
|
+
|
data/lib/chake/node.rb
CHANGED
data/lib/chake/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Terceiro
|
@@ -63,12 +63,14 @@ extensions: []
|
|
63
63
|
extra_rdoc_files: []
|
64
64
|
files:
|
65
65
|
- ".gitignore"
|
66
|
+
- ChangeLog.md
|
66
67
|
- Gemfile
|
67
68
|
- LICENSE.txt
|
68
69
|
- README.md
|
69
70
|
- Rakefile
|
70
71
|
- bin/chake
|
71
72
|
- chake.gemspec
|
73
|
+
- chake.spec.erb
|
72
74
|
- examples/test/Rakefile
|
73
75
|
- examples/test/config.rb
|
74
76
|
- examples/test/cookbooks/example/files/host-homer/test.asc
|