capistrano-golang 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capistrano-golang.gemspec +1 -1
- data/lib/capistrano/tasks/golang.rake +16 -14
- 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: f445ce8f9c6d5aac0f4fb59cc7ce416af516fd58
|
4
|
+
data.tar.gz: 2d664b9a16d323c29d085d770602e78a83b83147
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a71dfd420ece4c2ed46ccd4e2e361c0e87ba7c2f8bf5ec0a6b38e2c99a76e95b1cd603c4c437ac3a5ef7817334974ff238421ff1d1249497fa4862b35343580
|
7
|
+
data.tar.gz: 5aa46cb3da313057e38e7e58d0995f8d5ac149b89e8115cedf8a9c2a49834307954c2f54a66ad0c4f910c61f562254f92db2213e140cce60ae18b1474350ce5f
|
data/capistrano-golang.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "capistrano-golang"
|
7
|
-
gem.version = '0.
|
7
|
+
gem.version = '0.2.0'
|
8
8
|
gem.authors = ["Dimitrij Denissenko"]
|
9
9
|
gem.email = ["dimitrij@blacksquaremedia.com"]
|
10
10
|
gem.description = %q{Go deployment tasks for Capistrano}
|
@@ -8,26 +8,24 @@ namespace :go do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
task :hook do
|
11
|
-
|
12
|
-
|
11
|
+
goroot = fetch(:go_root)
|
13
12
|
on roles(fetch(:go_roles)) do
|
14
|
-
SSHKit.config.command_map.prefix[:go].unshift "GOROOT=#{
|
13
|
+
SSHKit.config.command_map.prefix[:go].unshift "GOROOT=#{goroot} PATH=#{goroot}/bin:$PATH"
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
17
|
task :check do
|
19
|
-
|
20
|
-
|
18
|
+
goroot = fetch(:go_root)
|
21
19
|
on roles(fetch(:go_roles)) do
|
22
|
-
if not test "[ -d #{
|
20
|
+
if not test "[ -d #{goroot}/src ]"
|
23
21
|
info "Downloading #{fetch :go_version}"
|
24
|
-
execute :mkdir, "-p",
|
25
|
-
execute :curl, "-
|
22
|
+
execute :mkdir, "-p", goroot
|
23
|
+
execute :curl, "-sSL #{fetch :go_source} | tar xvz --strip-components=1 -C #{goroot}"
|
26
24
|
end
|
27
25
|
|
28
|
-
if not test "[ -f #{
|
29
|
-
info "Installing #{fetch
|
30
|
-
execute %(cd #{
|
26
|
+
if not test "[ -f #{goroot}/bin/go ]"
|
27
|
+
info "Installing #{fetch :go_version}"
|
28
|
+
execute %(cd #{goroot}/src && ./make.bash --no-clean 2>&1)
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|
@@ -42,8 +40,12 @@ after 'deploy:check', 'go:check'
|
|
42
40
|
namespace :load do
|
43
41
|
task :defaults do
|
44
42
|
set :go_version, "go1.4.1"
|
45
|
-
set :
|
46
|
-
|
47
|
-
set :
|
43
|
+
set :go_roles, :all
|
44
|
+
|
45
|
+
set :go_install_path, "~/.gos"
|
46
|
+
set :go_archive, "https://golang.org/dl/VERSION.src.tar.gz"
|
47
|
+
|
48
|
+
set :go_root, -> { File.join(fetch(:go_install_path), fetch(:go_version)) }
|
49
|
+
set :go_source, -> { fetch(:go_archive).sub("VERSION", fetch(:go_version)) }
|
48
50
|
end
|
49
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-golang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|