Skip to content

Instantly share code, notes, and snippets.

@cjcolvar
Created July 15, 2014 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjcolvar/88f3a7ecaef3f05c4ab5 to your computer and use it in GitHub Desktop.
Save cjcolvar/88f3a7ecaef3f05c4ab5 to your computer and use it in GitHub Desktop.
Chris's local changes for IU avalon pilot deploy
diff --git a/Gemfile.local b/Gemfile.local
index acbd899..6555235 100644
--- a/Gemfile.local
+++ b/Gemfile.local
@@ -1,3 +1,3 @@
gem 'net-ldap'
gem 'omniauth-cas', :git => "https://github.com/cjcolvar/omniauth-cas.git"
-gem 'mysql2'
+#gem 'mysql2'
* Unmerged path Gemfile.lock
diff --git a/config/deploy/avalon.rb b/config/deploy/avalon.rb
index c3b5c5b..165e01d 100644
--- a/config/deploy/avalon.rb
+++ b/config/deploy/avalon.rb
@@ -5,7 +5,7 @@ set(:rails_env) { "production" }
set(:deployment_host) { "avalon-pilot.dlib.indiana.edu" } # Host(s) to deploy to
set(:deploy_to) { "/var/www/avalon" } # Directory to deploy into
set(:user) { 'avalon' } # User to deploy as
-set :branch, ENV['SCM_BRANCH'] || "release/3.0.0" # Git branch to deploy
+set :branch, ENV['SCM_BRANCH'] || "iu-pilot-3.0.0" # Git branch to deploy
set :hls_dir, "/var/avalon/hls_streams"
ssh_options[:keys] = ["/opt/staging/avalon/vov_deployment_key"]
@@ -16,7 +16,7 @@ role :web, deployment_host
role :app, deployment_host
role :db, deployment_host, :primary => true
-before "bundle:install", "deploy:link_local_gemfile"
+before "bundle:install", "deploy:link_local_files"
before "deploy:finalize_update", "deploy:remove_symlink_targets"
after "deploy:update_code", "deploy:symlink_dirs"
after "deploy:update_code", "deploy:migrate"
@@ -34,7 +34,6 @@ set(:shared_children) {
config/minter_state.yml
config/role_map_#{fetch(:rails_env)}.yml
config/solr.yml
- Gemfile.local
log
tmp/pids
}.split
@@ -57,7 +56,6 @@ namespace :deploy do
end
task :link_local_files do
- link_shared_file "Gemfile.local", "Gemfile.local"
link_shared_file "user_auth_cas.rb", "config/initializers/user_auth_cas.rb"
link_shared_file "iu-ldap.rb", "config/initializers/iu-ldap.rb"
link_shared_file "permalink.rb", "config/initializers/permalink.rb"
@@ -88,3 +86,6 @@ namespace :deploy do
end
end
+def link_shared_file source, target
+ run "if [ -f #{shared_path}/#{source} ]; then ln -s #{shared_path}/#{source} #{latest_release}/#{ta
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment