Class: DPL::Provider::Hackage
Instance Attribute Summary
#context, #options
Instance Method Summary
collapse
apt_get, #cleanup, #commit_msg, context, #create_key, #default_text_charset, #default_text_charset?, #deploy, deprecated, #detect_encoding?, #encoding_for, #error, experimental, #initialize, #log, new, npm_g, #option, pip, requires, #run, #setup_git_credentials, #setup_git_ssh, #sha, shell, #uncleanup, #user_agent, #warn
Constructor Details
This class inherits a constructor from DPL::Provider
Instance Method Details
#check_app ⇒ Object
12
13
14
|
# File 'lib/dpl/provider/hackage.rb', line 12
def check_app
context.shell "cabal check" or raise Error, "cabal check failed"
end
|
#check_auth ⇒ Object
6
7
8
9
10
|
# File 'lib/dpl/provider/hackage.rb', line 6
def check_auth
unless option(:username) and option(:password)
raise Error, "must supply username and password"
end
end
|
#needs_key? ⇒ Boolean
16
17
18
|
# File 'lib/dpl/provider/hackage.rb', line 16
def needs_key?
false
end
|
#push_app ⇒ Object
20
21
22
23
24
25
|
# File 'lib/dpl/provider/hackage.rb', line 20
def push_app
context.shell "cabal sdist" or raise Error, "cabal sdist failed"
Dir.glob("dist/*.tar.gz") do |tar|
context.shell "cabal upload --username=#{option(:username)} --password=#{option(:password)} #{tar}"
end
end
|