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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 188f3895b146831fa165dc83f26f3e19e414a730
4
- data.tar.gz: 1d83b87f0cf4886d0b63861d93bec433b08a9841
3
+ metadata.gz: ef6895c1a6d034cdacbb4ec27427276d272be63b
4
+ data.tar.gz: 8ed6503d1c2f852491dc92c84af5ffb85109d845
5
5
  SHA512:
6
- metadata.gz: 4b0ad617c30af66429c3fb502ad67d72f7653de396c31a3338fd5bf10d0c4d8f7a7a4b71e62c61deed9bf8c6746eb6fada043f6d33efe0c0ec0de7faf596f7a0
7
- data.tar.gz: 754f46452997db67bfdf2c2b2c163b391f4ff7a14a2fd366fc4c8a9340e93bccd989d96f86055a9b92fff0441b73e588d4e0badb4c9f00ca7df7f9165a9a3bc1
6
+ metadata.gz: 4f0cd933e0bef916c0c67395243c9ccf3a4ee8fb7d9516c1dd4ae40de44e0ff78394389215cd100cd64e10a24872df12df9e0b3d0b9860a79674360ddbc2fd1c
7
+ data.tar.gz: d601d40da01323873ee8d7f95c4bf266243b89fe1eef161233ad66fd0881287da7b70fb87d34adb1c98a2ea408a785831c37ce083f122a79668a3176b55334ec
@@ -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!!'
@@ -1,3 +1,3 @@
1
1
  module AppBuilder
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - i2bskn