itamae 1.0.0.beta16 → 1.0.0.beta17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af7d4bb27ff01452de7a18a4746c839a6e8acb39
4
- data.tar.gz: 81c20c90b909d57b4bbf55c3bc0e8e436a00d314
3
+ metadata.gz: 8f20806b378add5ce416a56101a4e38a7fc13620
4
+ data.tar.gz: bfb94bc29dfcdfa257a3a7c313ba2c740b9ae2c2
5
5
  SHA512:
6
- metadata.gz: 0615f89f2348df43c96f003a792f71443425dff36c1851b937727f18937978583c630298b1d710e494304474af484d00a8117f67bc89ecf46cde3c8e66c73fe2
7
- data.tar.gz: 4440f3fa23bb0d0cb4be68d4b9d87c62bc815b45df972d42b895e6e229c531a1aaf1dee1391346838afd91bb5822bda72cfb731bf549411b4bf4a01291ad205f
6
+ metadata.gz: a0974d13a8eb896be8070eb68e0e5f7610b0b571a027144ca4f7e597939ee1eeee78245ddf04cc8305adb1aca607070b586527d42c78a3be4e3c2dce6fdfa7ce
7
+ data.tar.gz: db93259f92f1e539ad1c6e7c5683dedd1d30da7071e7a2f747b26205935ef746668d6ee6314e5fa400f7bfa5aadab9ef8c5808bd8d63fa86d65c44dca8f31c66
@@ -17,12 +17,17 @@ module Itamae
17
17
  run_command_in_repo(['git', 'fetch', 'origin'])
18
18
  else
19
19
  run_command(['git', 'clone', repository, destination])
20
+ updated!
20
21
  end
21
22
 
22
23
  target_revision =
23
- revision ||
24
+ get_revision(revision) ||
24
25
  run_command_in_repo("git ls-remote origin HEAD | cut -f1").stdout.strip
25
26
 
27
+ unless target_revision == get_revision('HEAD')
28
+ updated!
29
+ end
30
+
26
31
  deploy_old_created = false
27
32
  if current_branch == DEPLOY_BRANCH
28
33
  run_command_in_repo("git branch -m deploy-old")
@@ -50,6 +55,10 @@ module Itamae
50
55
  def current_branch
51
56
  run_command_in_repo("git rev-parse --abbrev-ref HEAD").stdout.strip
52
57
  end
58
+
59
+ def get_revision(branch)
60
+ run_command_in_repo("git rev-list #{shell_escape(branch)} | head -n1").stdout.strip
61
+ end
53
62
  end
54
63
  end
55
64
  end
@@ -1 +1 @@
1
- 1.0.0.beta16
1
+ 1.0.0.beta17
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta16
4
+ version: 1.0.0.beta17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai