hkgr 0.5 → 0.5.1
raw patch · 5 files changed
+19/−11 lines, 5 files
Files
- CHANGELOG.md +5/−0
- README.md +3/−1
- data/template.cabal.tmpl +5/−5
- hkgr.cabal +2/−2
- src/Main.hs +4/−3
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Changelog +## 0.5.1 (2026-10-06)+- only add github remote if github.user defined+- cabal check: --ignore=missing-upper-bounds+- template: update tested-with+ ## 0.5 (2025-09-18) - support Cabal's XDG layout (#5, reported by Artem) ie check for ~/.config/cabal/config before ~/.cabal/config
README.md view
@@ -73,7 +73,7 @@ `$ hkgr --version` ```-0.4.8+0.5.1 ``` `$ hkgr --help` @@ -175,6 +175,8 @@ ## Requirements hkgr uses `cabal-install` >=2, `git`, and also `hlint` if available.++For Fedora there is a copr repo: <https://copr.fedorainfracloud.org/coprs/petersen/hkgr/> ## Contribute `hkgr` is licensed and distributed under the GPL version 3 or later.
data/template.cabal.tmpl view
@@ -15,12 +15,12 @@ build-type: Simple -- extra-doc-files: README.md -- ChangeLog.md--- tested-with: GHC == 8.10.7--- || == 9.0.2--- || == 9.2.8+-- tested-with: GHC == 9.2.8 -- || == 9.4.8--- || == 9.6.5--- || == 9.8.2+-- || == 9.6.7+-- || == 9.8.4+-- || == 9.10.3+-- || == 9.12.4 source-repository head type: git
hkgr.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: hkgr-version: 0.5+version: 0.5.1 synopsis: Simple Hackage release workflow for package maintainers description: Hkgr (Hackager) is a tool to help make new releases of@@ -13,7 +13,7 @@ license-file: LICENSE author: Jens Petersen <juhpetersen@gmail.com> maintainer: Jens Petersen <juhpetersen@gmail.com>-copyright: 2019-2025 Jens Petersen+copyright: 2019-2026 Jens Petersen category: Util build-type: Simple data-dir: data
src/Main.hs view
@@ -223,7 +223,7 @@ git_ "checkout" ["-q", tag] whenM (doesFileExist ".gitmodules") $ git_ "submodule" ["update", "--init"]- cabal_ "check" []+ cabal_ "check" ["--ignore=missing-upper-bounds"] unless noHlint $ do mhlint <- findExecutable "hlint" when (isJust mhlint) $ do@@ -485,10 +485,11 @@ githubCmd :: IO () githubCmd = do- ghuser <- cmdOut $ git "config" ["--global", "github.user"]+ mghuser <- cmdMaybe $ git "config" ["--global", "github.user"] pkgid <- getPackageId let name = unPackageName (pkgName pkgid)- git_ "remote" ["add", "origin", "git@github.com:" ++ ghuser </> name <.> "git"]+ whenJust mghuser $ \ghuser ->+ git_ "remote" ["add", "origin", "git@github.com:" ++ ghuser </> name <.> "git"] git_ "branch" ["-M", "main"] -- git_ "push" ["-u", "origin", "main"]