app_builder 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app_builder/config.rb +2 -0
- data/lib/app_builder/template/manifest.yml.erb +3 -0
- data/lib/app_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef6895c1a6d034cdacbb4ec27427276d272be63b
|
4
|
+
data.tar.gz: 8ed6503d1c2f852491dc92c84af5ffb85109d845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f0cd933e0bef916c0c67395243c9ccf3a4ee8fb7d9516c1dd4ae40de44e0ff78394389215cd100cd64e10a24872df12df9e0b3d0b9860a79674360ddbc2fd1c
|
7
|
+
data.tar.gz: d601d40da01323873ee8d7f95c4bf266243b89fe1eef161233ad66fd0881287da7b70fb87d34adb1c98a2ea408a785831c37ce083f122a79668a3176b55334ec
|
data/lib/app_builder/config.rb
CHANGED
@@ -9,6 +9,7 @@ module AppBuilder
|
|
9
9
|
:resource_type, # :s3 or :http or :https (default: :s3)
|
10
10
|
:upload_id, # bucket name or remote host (default: none)
|
11
11
|
:remote_app_home_base, # default: /var/www
|
12
|
+
:keep_release # default: 5
|
12
13
|
:logger, # default: AppBuilder::Logger
|
13
14
|
|
14
15
|
# hooks
|
@@ -141,6 +142,7 @@ module AppBuilder
|
|
141
142
|
@remote_app_home_base = "/var/www"
|
142
143
|
@logger = Logger.new(STDOUT)
|
143
144
|
@resource_type = :s3
|
145
|
+
@keep_release = 5
|
144
146
|
|
145
147
|
# for upload to S3 (from `.aws/config` and `.aws/credentials`)
|
146
148
|
@region = ENV.fetch("AWS_DEFAULT_REGION", aws_config("region") || "ap-northeast-1")
|
@@ -7,14 +7,17 @@ commands:
|
|
7
7
|
- mkdir -p <%= remote_app_home %>/releases
|
8
8
|
- mkdir -p <%= remote_app_home %>/shared/log
|
9
9
|
- mkdir -p <%= remote_app_home %>/shared/pids
|
10
|
+
- mkdir -p <%= remote_app_home %>/shared/bindle
|
10
11
|
post:
|
11
12
|
- ln -nfs <%= remote_app_home %>/releases/<%= build_id %> <%= remote_app_home %>/current
|
12
13
|
- rm -rf <%= remote_app_home %>/current/log
|
13
14
|
- ln -nfs <%= remote_app_home %>/shared/log <%= remote_app_home %>/current/log
|
14
15
|
- mkdir -p <%= remote_app_home %>/current/tmp
|
15
16
|
- ln -nfs <%= remote_app_home %>/shared/pids <%= remote_app_home %>/current/tmp/pids
|
17
|
+
- cd <%= remote_app_home %>/current && bundle install --deployment --without development test --path <%= remote_app_home %>/shared/bundle
|
16
18
|
- echo 'deploy done'
|
17
19
|
success:
|
20
|
+
- cd <%= remote_app_home %>/releases && ls -1 | sort --reverse | tail -n +<%= keep_release + 1 %> | xargs rm -rf
|
18
21
|
- echo 'deploy success'
|
19
22
|
failure:
|
20
23
|
- echo 'deploy failed!!'
|
data/lib/app_builder/version.rb
CHANGED