cap-git-deploy 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cap-git-deploy.gemspec +0 -2
- data/lib/cap-git-deploy.rb +5 -6
- data/lib/cap-git-deploy/version.rb +1 -1
- data/lib/recipes/git-revisioning.rb +8 -7
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6ea635853d315bab5683403f0b1a672017e9569
|
4
|
+
data.tar.gz: d0466392b528f2b509c91dd7b9c83dda7079f90d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31ee25f5d4fd1914da809540716a5a275d687eecf903a3620a1d4ecc2a01aed7b060f24880602404fa5697047cb7e4ded02a69f0b5f5f095daddf822165c8348
|
7
|
+
data.tar.gz: e71b6c3232ad4ee342e5ae1cdca27bbcd4171713b779bcad16be5dc79dc300dc611e530cf8d7332d8170736f0b98615c85f3ca4a943172020433e01cf25fd900
|
data/cap-git-deploy.gemspec
CHANGED
data/lib/cap-git-deploy.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'capistrano'
|
2
2
|
require 'cap-git-deploy/version'
|
3
3
|
|
4
|
-
require 'grit'
|
5
4
|
require 'etc'
|
6
5
|
|
7
6
|
module Cap
|
@@ -11,15 +10,15 @@ module Cap
|
|
11
10
|
|
12
11
|
# The name of the branch we are deploying
|
13
12
|
def self.current_branch
|
14
|
-
repo =
|
15
|
-
branch = repo.head
|
16
|
-
# if branch is nil, we are in a spurius commit, then we should use master
|
17
|
-
branch && branch.name || 'master'
|
13
|
+
repo = `git rev-parse --abbrev-ref HEAD`.chomp
|
18
14
|
end
|
19
15
|
|
20
16
|
# The name of the current logged user
|
21
17
|
def self.current_user
|
22
|
-
|
18
|
+
login = Etc.getlogin
|
19
|
+
user = Etc.getpwnam(login)
|
20
|
+
host = Socket.gethostname
|
21
|
+
"<#{user}> #{login}@#{host}"
|
23
22
|
end
|
24
23
|
end
|
25
24
|
end
|
@@ -13,13 +13,14 @@ namespace :revision do
|
|
13
13
|
sha = data.strip
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
revision_contents = [
|
17
|
+
sha,
|
18
|
+
branch,
|
19
|
+
logged_user,
|
20
|
+
Time.now,
|
21
|
+
].join("\n")
|
22
|
+
|
23
|
+
put revision_contents, "#{current_path}/#{revision_file}"
|
23
24
|
end
|
24
25
|
|
25
26
|
desc "Get info about last deploy"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cap-git-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicola Racco
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -25,20 +25,6 @@ dependencies:
|
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '2.0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: grit
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - '>='
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - '>='
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: rake
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|