Read .deploy-sha file from the proper path
This commit is contained in:
parent
ce470af1c3
commit
7099331907
|
@ -52,7 +52,11 @@ module Travis::Api
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.deploy_sha
|
def self.deploy_sha
|
||||||
@deploy_sha ||= File.exist?('.deploy_sha') ? File.read('.deploy-sha')[0..7] : 'deploy-sha'
|
@deploy_sha ||= File.exist?(deploy_sha_path) ? File.read(deploy_sha_path)[0..7] : 'deploy-sha'
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.deploy_sha_path
|
||||||
|
File.expand_path('../../../../.deploy_sha', __FILE__)
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_accessor :app
|
attr_accessor :app
|
||||||
|
@ -70,8 +74,8 @@ module Travis::Api
|
||||||
if Travis::Features.feature_active?(:use_rack_cache) && memcache_server
|
if Travis::Features.feature_active?(:use_rack_cache) && memcache_server
|
||||||
use Rack::Cache,
|
use Rack::Cache,
|
||||||
verbose: true,
|
verbose: true,
|
||||||
metastore: "memcached://#{memcache_servers}/#{self.class.deploy_sha}",
|
metastore: "memcached://#{memcache_servers}/#{Travis::Api::App.deploy_sha}",
|
||||||
entitystore: "memcached://#{memcache_servers}/#{self.class.deploy_sha}"
|
entitystore: "memcached://#{memcache_servers}/#{Travis::Api::App.deploy_sha}"
|
||||||
end
|
end
|
||||||
|
|
||||||
use Rack::Deflater
|
use Rack::Deflater
|
||||||
|
|
Loading…
Reference in New Issue
Block a user