capistrano-s3-copy 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -61,14 +61,28 @@ someone running:
61
61
  Of course, everyone has tweaks that they make to the standard capistrano recipe. For this reason, the script
62
62
  thats executed is generated from an ERB template.
63
63
 
64
+
64
65
  #!/bin/sh
65
66
 
66
67
  # Auto-scaling capistrano like deployment script Rails3 specific.
67
68
 
69
+ set -x
70
+ set -e
71
+
68
72
  echo "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
69
73
  echo "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
70
- AWS_RELEASES_BUCKET=<%= configuration[:aws_releases_bucket] %>
71
74
 
75
+ if [ "${AWS_ACCESS_KEY_ID}" == "" ]; then
76
+ echo "Expecting the environment variable AWS_ACCESS_KEY_ID to be set"
77
+ exit 1
78
+ fi
79
+
80
+ if [ "${AWS_SECRET_ACCESS_KEY}" == "" ]; then
81
+ echo "Expecting the environment variable AWS_SECRET_ACCESS_KEY to be set"
82
+ exit 2
83
+ fi
84
+
85
+ AWS_RELEASES_BUCKET=<%= configuration[:aws_releases_bucket] %>
72
86
  RAILS_ENV=<%= configuration[:rails_env] %> # e.g. production
73
87
  DEPLOY_TO=<%= configuration[:deploy_to] %> # e.g. /u/apps/myapp
74
88
  RELEASES_PATH=<%= configuration[:releases_path] %> # e.g. /u/apps/myapp/releases
@@ -98,7 +112,7 @@ thats executed is generated from an ERB template.
98
112
  # mkdir -p ${SHARED_PATH}/uploads
99
113
 
100
114
  # cap deploy:update_code
101
- s3cmd get ${AWS_RELEASE_BUCKET}:${S3_PACKAGE_PATH} ${DOWNLOADED_PACKAGE_PATH} 2>&1
115
+ s3cmd get ${AWS_RELEASES_BUCKET}:${S3_PACKAGE_PATH} ${DOWNLOADED_PACKAGE_PATH} 2>&1
102
116
  cd ${RELEASES_PATH} && ${DECOMPRESS_CMD} && rm ${DOWNLOADED_PACKAGE_PATH}
103
117
 
104
118
  # cap deploy:assets_symlink (Rails 3.x specific)
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module S3
3
3
  module Copy
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -2,8 +2,22 @@
2
2
 
3
3
  # Auto-scaling capistrano like deployment script Rails3 specific.
4
4
 
5
+ set -x
6
+ set -e
7
+
5
8
  echo "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
6
9
  echo "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
10
+
11
+ if [ "${AWS_ACCESS_KEY_ID}" == "" ]; then
12
+ echo "Expecting the environment variable AWS_ACCESS_KEY_ID to be set"
13
+ exit 1
14
+ fi
15
+
16
+ if [ "${AWS_SECRET_ACCESS_KEY}" == "" ]; then
17
+ echo "Expecting the environment variable AWS_SECRET_ACCESS_KEY to be set"
18
+ exit 2
19
+ fi
20
+
7
21
  AWS_RELEASES_BUCKET=<%= configuration[:aws_releases_bucket] %>
8
22
 
9
23
  RAILS_ENV=<%= configuration[:rails_env] %> # e.g. production
@@ -35,7 +49,7 @@ chmod -R g+w ${DEPLOY_TO}
35
49
  # mkdir -p ${SHARED_PATH}/uploads
36
50
 
37
51
  # cap deploy:update_code
38
- s3cmd get ${AWS_RELEASE_BUCKET}:${S3_PACKAGE_PATH} ${DOWNLOADED_PACKAGE_PATH} 2>&1
52
+ s3cmd get ${AWS_RELEASES_BUCKET}:${S3_PACKAGE_PATH} ${DOWNLOADED_PACKAGE_PATH} 2>&1
39
53
  cd ${RELEASES_PATH} && ${DECOMPRESS_CMD} && rm ${DOWNLOADED_PACKAGE_PATH}
40
54
 
41
55
  # cap deploy:assets_symlink (Rails 3.x specific)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capistrano-s3-copy
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Richie McMahon
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-28 00:00:00 Z
13
+ date: 2012-04-29 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capistrano