cli: disable no-longer-used --binary-filename flag
It was still supported (as a hidden flag) by hledger-web, and now is not.
This commit is contained in:
parent
1492fca8f1
commit
606d992fc8
@ -55,7 +55,7 @@ main = do
|
||||
_ | "info" `inRawOpts` rawopts -> runInfoForTopic "hledger-ui" Nothing
|
||||
_ | "man" `inRawOpts` rawopts -> runManForTopic "hledger-ui" Nothing
|
||||
_ | "version" `inRawOpts` rawopts -> putStrLn prognameandversion
|
||||
_ | "binary-filename" `inRawOpts` rawopts -> putStrLn (binaryfilename progname)
|
||||
-- _ | "binary-filename" `inRawOpts` rawopts -> putStrLn (binaryfilename progname)
|
||||
_ -> withJournalDo copts' (runBrickUi opts)
|
||||
|
||||
runBrickUi :: UIOpts -> Journal -> IO ()
|
||||
|
||||
@ -57,7 +57,7 @@ hledgerWebMain = do
|
||||
| "info" `inRawOpts` rawopts_ -> runInfoForTopic "hledger-web" Nothing
|
||||
| "man" `inRawOpts` rawopts_ -> runManForTopic "hledger-web" Nothing
|
||||
| "version" `inRawOpts` rawopts_ -> putStrLn prognameandversion >> exitSuccess
|
||||
| "binary-filename" `inRawOpts` rawopts_ -> putStrLn (binaryfilename progname)
|
||||
-- | "binary-filename" `inRawOpts` rawopts_ -> putStrLn (binaryfilename progname)
|
||||
| "test" `inRawOpts` rawopts_ -> do
|
||||
-- remove --test and --, leaving other args for hspec
|
||||
filter (not . (`elem` ["--test","--"])) <$> getArgs >>= flip withArgs hledgerWebTest
|
||||
|
||||
@ -97,12 +97,13 @@ webmode =
|
||||
Group
|
||||
{ groupUnnamed = webflags
|
||||
, groupHidden =
|
||||
hiddenflags ++
|
||||
[ flagNone
|
||||
["binary-filename"]
|
||||
(setboolopt "binary-filename")
|
||||
"show the download filename for this executable, and exit"
|
||||
]
|
||||
hiddenflags
|
||||
-- ++
|
||||
-- [ flagNone
|
||||
-- ["binary-filename"]
|
||||
-- (setboolopt "binary-filename")
|
||||
-- "show the download filename for this executable, and exit"
|
||||
-- ]
|
||||
, groupNamed = [generalflagsgroup1]
|
||||
}
|
||||
, modeHelpSuffix = []
|
||||
|
||||
@ -9,7 +9,7 @@ module Hledger.Cli.Version (
|
||||
version,
|
||||
prognameandversion,
|
||||
versiondescription,
|
||||
binaryfilename,
|
||||
-- binaryfilename,
|
||||
)
|
||||
where
|
||||
|
||||
@ -32,6 +32,8 @@ version = VERSION
|
||||
#else
|
||||
version = "dev build"
|
||||
#endif
|
||||
|
||||
prognameandversion :: String
|
||||
prognameandversion = versiondescription progname
|
||||
|
||||
-- developer build version strings include PATCHLEVEL (number of
|
||||
@ -72,13 +74,13 @@ versiondescription progname = concat
|
||||
| os == "mingw32" = "windows"
|
||||
| otherwise = os
|
||||
|
||||
-- | Given a program name, return a precise platform-specific executable
|
||||
-- name suitable for naming downloadable binaries. Can raise an error if
|
||||
-- the version and patch level was not defined correctly at build time.
|
||||
binaryfilename :: String -> String
|
||||
binaryfilename progname = concat
|
||||
[progname, "-", buildversion, "-", os', "-", arch, suffix]
|
||||
where
|
||||
(os',suffix) | os == "darwin" = ("mac","" :: String)
|
||||
| os == "mingw32" = ("windows",".exe")
|
||||
| otherwise = (os,"")
|
||||
-- -- | Given a program name, return a precise platform-specific executable
|
||||
-- -- name suitable for naming downloadable binaries. Can raise an error if
|
||||
-- -- the version and patch level was not defined correctly at build time.
|
||||
-- binaryfilename :: String -> String
|
||||
-- binaryfilename progname = concat
|
||||
-- [progname, "-", buildversion, "-", os', "-", arch, suffix]
|
||||
-- where
|
||||
-- (os',suffix) | os == "darwin" = ("mac","" :: String)
|
||||
-- | os == "mingw32" = ("windows",".exe")
|
||||
-- | otherwise = (os,"")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user