Class: DPL::Provider::Hackage
- Inherits:
-
DPL::Provider
- Object
- DPL::Provider
- DPL::Provider::Hackage
- Defined in:
- lib/dpl/provider/hackage.rb
Instance Method Summary collapse
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 |