This repository was archived by the owner on Nov 6, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ after_success:
3030 chmod 600 config/deploy_id_rsa;
3131 eval `ssh-agent -s`;
3232 ssh-add config/deploy_id_rsa;
33- bundle exec cap staging deploy;
33+ BRANCH=master bundle exec cap staging deploy;
3434 ssh-agent -k;
3535 fi
3636env :
Original file line number Diff line number Diff line change @@ -96,3 +96,6 @@ Keep in mind that you need js to be enabled. For example:
9696```
9797describe "PickupSheet", type: :feature, js: true do
9898```
99+
100+ # Deployment Process
101+ Please follow the deployment instructions in the associated diaper application [ here] ( https://github.com/rubyforgood/diaper#deployment-process )
Original file line number Diff line number Diff line change 2626
2727## Defaults:
2828# set :scm, :git
29- set :branch , ENV [ "BRANCH" ] || :master
29+ set :branch do
30+ if ENV [ "TAG" ] && ENV [ "BRANCH" ]
31+ raise "You can only specify either TAG or BRANCH"
32+ elsif ENV [ "TAG" ]
33+ ENV [ "TAG" ]
34+ elsif ENV [ "BRANCH" ]
35+ ENV [ "BRANCH" ]
36+ end
37+ end
3038# set :format, :pretty
3139# set :log_level, :debug
3240# set :keep_releases, 5
5159 desc "Make sure local git is in sync with remote."
5260 task :check_revision do
5361 on roles ( :app ) do
54- unless `git rev-parse HEAD` == `git rev-parse origin/master`
55- puts "WARNING: HEAD is not the same as origin/master"
56- puts "Run `git push` to sync changes."
62+ if fetch ( :branch ) . nil?
63+ puts "You must provide either a TAG or a BRANCH. Example: 'TAG=2.2.0 cap <environment> deploy'"
5764 exit
5865 end
5966 end
You can’t perform that action at this time.
0 commit comments