イフブロ

イフブロ

インフラエンジニアのブログ

Capistranoのリリースログ翻訳 3.6.0 3.7.0 3.8.0 3.9.0

Capistranoのバージョンアップの際にリリースログを読んで日本語で保存しておく

新機能とDeprecateだけ。(BugFixとOtherChageは気になるやつだけ書きます)

3.6.0

https://github.com/capistrano/capistrano/blob/master/CHANGELOG.md#360-2016-07-26

Deprecations:
Deprecate remote_file feature (will be removed in Capistrano 3.7.0) (@lebedev-yury)
Deprecate :git_strategy, :hg_strategy, and :svn_strategy variables. These will be completely removed in 3.7.0.
Added warning about future deprecation of reinvocation behaviour (@troelskn)
Refer to the Capistrano 3.7.0 upgrade document if you are affected by these deprecations.
  • remote_file のコマンドが禁止になったよ。3.7.0で完全に消すよ。
  • :git_strategy, :hg_strategy, and :svn_strategyの変数が禁止になったよ。3.7.0で完全に消すよ。
  • 再呼び出し動作の将来の非難についての警告を追加 (よくわからん。)
New features:
Added a doctor:servers subtask that outputs a summary of servers, roles & properties (@irvingwashington)
Make path to git wrapper script configurable (@thickpaddy)
Make name of current directory configurable via configuration variable :current_directory (@websi)
It is now possible to rollback to a specific release using the ROLLBACK_RELEASE environment variable. #1155 (@lanrion)
  • doctor:servers タスクが追加になったよ。以前ここで書いたdocter系タスクの新規機能でサーバー一覧出してくれる。 qiita.com
  • git の wrapper scriptをコンフィグで場所指定できる様になったよ (今までは /tmp/)

  • 実行時のcurrent directoryが変数:current_directoryで指定可能になったよ。

  • リリース時にリリースバックを環境変数ROLLBACK_RELEASE で指示可能になったよ。

以下は読んでない。

Fixes:
doctor no longer erroneously warns that :git_strategy and other SCM options are "unrecognized" (@shanesaww)
Fix NoMethodError: undefined method gsub when setting :application to a Proc. #1681 (@mattbrictson)

Other changes:
Raise a better error when an ‘after’ hook isn’t found (@jdelStrother)
Change git wrapper path to work better with multiple users (@thickpaddy)
Restrict the uploaded git wrapper script permissions to 700 (@irvingwashington)
Add net-ssh gem version to doctor:gems output (@lebedev-yury)

3.6.1

3.6のBugFixばかりですね 読んでない。

Fixes:
Restore compatibility with older versions of Rake (< 11.0.0) (@troelskn)
Fix NoMethodError: undefined method gsub when setting :application to a Proc. The original fix released in 3.6.0 worked for values specified with blocks, but not for those specified with procs or lambdas (the latter syntax is much more common). #1681
Fix a bug where deploy would fail if :local_user contained a space; spaces are now replaced with dashes when computing the git-ssh suffix. (@will_in_wi)

3.7.0beta

Deprecations:

The set :scm, ... mechanism is now deprecated in favor of a new SCM plugin system. See the UPGRADING-3.7 document for details.

scm周りのタスク大きく変わるから capistrano/UPGRADING-3.7.md at master · capistrano/capistrano · GitHubを参照して対応してよ。じゃないと落ちるよ。

Potentially breaking changes:
The :git_strategy, :hg_strategy, and :svn_strategy settings have been removed with no replacement. If you have been using these to customize Capistrano's SCM behavior, you will need to rewrite your customization using the new plugin system.
remote_file feature has been removed and is no longer available to use @SaiVardhan

破壊的変更です。 3.6.0でdeprecateになった remote_file :git_strategy, :hg_strategy, and :svn_strategy が消えます。

New features:

The tar used by the Git SCM now honors the SSHKit command map, allowing an alternative tar binary to be used (e.g. gtar) #1787 (@caius)

tarコマンドはOSインストールされている tarコマンドを使ってたけど、別のコマンドも使えるようになったそうです。 set :tar, 'gtar' みたいに指定するっぽい。

Fixes:

Fix test suite to work with Mocha 1.2.0 (@caius)
Fix bug where host_filter and role_filter were overly greedy #1766 (@cseeger-epages)

二つ目が気になる。 今までFilterは部分一致だったのが改善されたっぽい。 プルリクをざっくり意訳

## コマンド
eg. cap stage --hosts=system01 
using a stage with defined hosts:
system011
system012
system020

## 期待する挙動
empty host list or ERROR Host does not exists or sth. like this

何にも該当しない。

## 実際の挙動
system011
system012
に該当する

これを直すぞ。との事。 これは嬉しい。 プルリク見る限り正規表現無ければ完全マッチさせるっぽい。

vs =~ /^[-A-Za-z0-9.]+$/ ? vs : Regexp.new(vs)
↓
vs =~ /^[-A-Za-z0-9.]+$/ ? %r{^#{vs}$} : Regexp.new(vs)

3.7.0

Deprecations:
The set :scm, ... mechanism is now deprecated in favor of a new SCM plugin system. See the UPGRADING-3.7 document for details

3.7.0 Betaと同じ

Potentially breaking changes:
The :git_strategy, :hg_strategy, and :svn_strategy settings have been removed with no replacement. If you have been using these to customize Capistrano's SCM behavior, you will need to rewrite your customization using the new plugin system
remote_file feature has been removed and is no longer available to use @SaiVardhan

3.7.0 Betaと同じ

New features:
The tar used by the Git SCM now honors the SSHKit command map, allowing an alternative tar binary to be used (e.g. gtar) #1787 (@caius)
Add support for custom on-filters #1776

3.7.0 Betaと同じ + カスタムon-filterが使えるようになったとの事。 カスタムon-filtersとは何か?

実装 Add support for adding custom filters by DylanFrese · Pull Request #1777 · capistrano/capistrano · GitHub

README読めばなんとなくわかりそう。サンプルではREGIONを指定している。 確かにAWSとかではリージョン指定でデプロイしたくなるだろうな〜 capistrano/index.markdown at master · capistrano/capistrano · GitHub

Fixes:
Fix test suite to work with Mocha 1.2.0 (@caius)
Fix bug where host_filter and role_filter were overly greedy #1766 (@cseeger-epages)
Fix the removal of old releases deploy:cleanup. Logic is changed because of unreliable modification times on folders. Removal of directories is now decided by sorting on folder names (name is generated from current datetime format YmdHis). Cleanup is skipped, and a warning is given when a folder name is in a different format

読んでない。 Fix bug where host_filter and role_filter were overly greedy が上述した、Filterのバグ修正です。

3.7.1

Fixes:
Fixed a bug with mercurial deploys failing due to an undefined variable

読んでない。

3.7.2

Other changes:
Suppress log messages of git ls-remote by filtering remote refs (@aeroastro)
The Git SCM now allows the repo_url to be changed without manually wiping out the mirror on each target host first (@javanthropus)
  • gitのls-remoteのログメッセージを抑止
  • ? ターゲットホストごとに repo_urlが変えられる様になった?(よく理解してない)

3.8.0

Minor breaking changes:
#1846: add_host - When this method has already been called once for a given host and it is called a second time with a port, a new host will be added. Previously, the first host would have been updated. (@dbenamy)

add_host が破壊的変更との事。 (機械翻訳) このメソッドが指定のホストに対して一度呼び出され、ポートで2回目に呼び出されると、新しいホストが追加されます。以前は、最初のホストが更新されていました。

New features:
#1860: Allow cap to be run within subdir and still work - @mattbrictson

サブディレクトリで cap を実行しても Capfile を見つけて実行できるようになったっぽい。

Fixes:
#1835: Stopped printing parenthesis in ask prompt if no default or nil was passed as argument (@chamini2)
#1840: Git plugin: shellescape git_wrapper_path (@olleolleolle)
#1843: Properly shell escape git:wrapper steps - @mattbrictson
#1846: Defining a role is now O(hosts) instead of O(hosts^2) (@dbenamy)
Run svn switch to work with svn branches if repo_url is changed
#1856: Fix hg repo_tree implementation - @mattbrictson
#1857: Don't emit doctor warning when repo_tree is set - @mattbrictson

あんまり気になるのない

Other changes:
capistrano-harrow#4: Drop dependency on capistrano-harrow gem. Gem can still be installed separately (@leehambley)
#1859: Move git-specific repo_url logic into git plugin - @mattbrictson
#1858: Unset the :scm variable when an SCM plugin is used - @mattbrictson
  • capistrano-harrow がデフォルトインストール対象から外すよ。
  • それ以外は見てない

3.8.1

Fixes:
#1867: Allow cap -T to run without Capfile present - @mattbrictson

cap -T 実行時に Capfile がなくても実行できる様にした? あんまり詳しく見てない。

3.8.2

Other changes:
#1882: Explain where to add new Capfile lines in scm deprecation warning - @robd

気になるのない。見てない。

3.9.0

New features:
#1911: Add Capistrano::DSL#invoke! for repetetive tasks

invoke! が使える様になりました。今までは invoke の中で Reenableにしていたのが不要で Reenableを設定しなくても、何度も実行可能なinvoke みたいな感じっぽいです。

Fixes:
#1899: Updated deploy:cleanup to continue rotating the releases and skip the invalid directory names instead of skipping the whole rotation of releases. The warning message has changed slightly due to the change of behavior.

気になるのない。見てない。