Class: Awestruct::Deploy::Base
- Inherits:
-
Object
- Object
- Awestruct::Deploy::Base
show all
- Defined in:
- lib/awestruct/deploy/base_deploy.rb
Constant Summary
collapse
- UNCOMMITTED_CHANGES =
"You have uncommitted changes in the working branch. Please commit or stash them."
Instance Method Summary
collapse
Instance Method Details
#existing_changes ⇒ Object
24
25
26
|
# File 'lib/awestruct/deploy/base_deploy.rb', line 24
def existing_changes
$LOG.error UNCOMMITTED_CHANGES if $LOG.error?
end
|
#git ⇒ Object
16
17
18
|
# File 'lib/awestruct/deploy/base_deploy.rb', line 16
def git
@git ||= ::Git.open('.')
end
|
#publish_site ⇒ Object
20
21
22
|
# File 'lib/awestruct/deploy/base_deploy.rb', line 20
def publish_site
$LOG.error( "#{self.class.name}#publish_site not implemented." ) if $LOG.error?
end
|
#run(deploy_config) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/awestruct/deploy/base_deploy.rb', line 8
def run(deploy_config)
if deploy_config['uncommitted'] == true
publish_site
else
git.status.changed.empty? ? publish_site : existing_changes
end
end
|