Configuring a keb download to work with a local hacker server

I have a local hacker server installed for development on 192.168.1.100:8080 . After developing and packaging the package with cabal sdist I need to go to 192.168.1.100:8080 in my browser and manually download the package.

This is very tiring, especially during sprints, such as when several packages are processed, etc., and I just would like to use cabal upload .

For a package named my-pacakge.tar.gz, running cabal upload results in:

 Uploading dist/my-package-0.1.1.0.tar.gz... Error: dist/my-package-0.1.1.0.tar.gz: 404 Not Found Error: Page not found Sorry, it just not here. 

The modified part of my cabal configuration is as follows:

 ... remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive remote-repo: my.hackage:http://192.168.1.100:8080/packages/archive ... 

The second line determines the priority of the local hacker over hackage.haskell for cabal install

How do I install cabal upload to upload to a local hack?

+6
source share
1 answer

The remote repo must be configured as

remote-repo: my-hackage:http://my-hackage.com:8080/

those. no /packages/archive . The extra path only works as a hack on the main server to match the old paths (pre-hackage 2.0).

(cf https://github.com/haskell/hackage-server/issues/164 )

0
source

Source: https://habr.com/ru/post/975259/


All Articles