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