Skip to content

Commit

Permalink
Fix a bug in github: ...
Browse files Browse the repository at this point in the history
(introduced with `0.34.0` / f63eb19)
  • Loading branch information
sol committed May 14, 2020
1 parent f455b78 commit fed5c7f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Changes in 0.34.0
## Changes in 0.34.1
- Fix a bug in `github: ...` introduced with `0.34.0`
(f63eb19b956517b4dd8e28dc5785be5889a99298)

## Changes in 0.34.0 (deprecated)
- Use `PreferNoHash` as default `GenerateHashStrategy`
- Add support for library `visibility` (see #382)
- Reject URLs for `github`
Expand Down
6 changes: 2 additions & 4 deletions hpack.cabal
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.33.0.
-- This file has been generated from package.yaml by hpack version 0.33.1.
--
-- see: https://github.com/sol/hpack
--
-- hash: 12b7d6619eff1d32190bac55f5a9d29fc4732f7475eb5e450effd690c9f53964

name: hpack
version: 0.34.0
version: 0.34.1
synopsis: A modern format for Haskell packages
description: See README at <https://github.com/sol/hpack#readme>
category: Development
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: hpack
version: 0.34.0
version: 0.34.1
synopsis: A modern format for Haskell packages
description: See README at <https://github.com/sol/hpack#readme>
maintainer: Simon Hengel <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/Hpack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ toPackage_ dir (Product g PackageConfig{..}) = do
github = toSourceRepository <$> packageConfigGithub
where
toSourceRepository :: GitHub -> SourceRepository
toSourceRepository (GitHub repo owner subdir) = SourceRepository (githubBaseUrl ++ owner ++ "/" ++ repo) subdir
toSourceRepository (GitHub owner repo subdir) = SourceRepository (githubBaseUrl ++ owner ++ "/" ++ repo) subdir

homepage :: Maybe String
homepage = case packageConfigHomepage of
Expand Down
8 changes: 4 additions & 4 deletions test/EndToEndSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ spec = around_ (inTempDirectoryNamed "foo") $ do
describe "github" $ do
it "accepts owner/repo" $ do
[i|
github: hspec/hspec
github: sol/hpack
|] `shouldRenderTo` package [i|
homepage: https://github.com/hspec/hspec#readme
bug-reports: https://github.com/hspec/hspec/issues
homepage: https://github.com/sol/hpack#readme
bug-reports: https://github.com/sol/hpack/issues
source-repository head
type: git
location: https://github.com/hspec/hspec
location: https://github.com/sol/hpack
|]

it "accepts owner/repo/path" $ do
Expand Down

0 comments on commit fed5c7f

Please sign in to comment.