packages feed

music-util 0.14 → 0.15

raw patch · 2 files changed

+39/−37 lines, 2 files

Files

music-util.cabal view
@@ -1,6 +1,6 @@  name:               music-util-version:            0.14+version:            0.15 cabal-version:      >= 1.10 author:             Hans Hoglund maintainer:         Hans Hoglund <hans@hanshoglund.se>
src/music-util.hs view
@@ -51,8 +51,14 @@ packages = labels dependencies  realPackages :: [String]-realPackages = packages `sans` "music-util" `sans` "music-docs"+realPackages = packages+  `sans` "music-util"+  `sans` "music-docs" +packagesToDocument :: [String]+packagesToDocument = realPackages +  `sans` "music-suite" -- Haddock doesn't like packges with no moduless+ dependencies :: Gr String String dependencies = mkGraph     [@@ -196,25 +202,37 @@ usage = do     echo $ "usage: music-util <command> [<args>]"     echo $ ""+    echo $ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"+    echo $ "Please note: `music-util` is a utility program for Music Suite"+    echo $ "development. If you just want to install the suite, simply type"+    echo $ ""+    echo $ "    cabal install music-suite"+    echo $ ""+    echo $ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"+    echo $ ""     echo $ "Commands:"-    echo $ "   repl               Start a GHCI session with the development version of the suite"-    echo $ "   list               Show a list all packages in the Music Suite"-    echo $ "   graph              Show a graph all packages in the Music Suite (requires Graphviz)"-    echo $ "   setup              Download all packages and setup sandbox"-    echo $ "   setup clone          Download all packages"-    echo $ "   setup sandbox        Setup the sandbox"-    echo $ "   grep <expr> [opts] Search in the Music Suite source code"-    echo $ "   test [opts]        Run unit tests"-    echo $ "   foreach <command>  Run a command in each source directory"-    echo $ "   package-path       Print a suitable GHC_PACKAGE_PATH value for use with runhaskell etc"-    echo $ "   document           Generate and upload documentation"-    echo $ "                        --reinstall-transf  Reinstall the transf package"-    echo $ "                        --no-api            Skip creating the API documentation"-    echo $ "                        --no-reference      Skip creating the reference documentation"-    echo $ "                        --local             Skip uploading"+    echo $ "    repl               Start a GHCI session with the development version of the suite"+    echo $ "    list               Show a list all packages in the Music Suite"+    echo $ "    graph              Show a graph all packages in the Music Suite (requires Graphviz)"+    echo $ "    setup              Download all packages and setup sandbox"+    echo $ "    setup clone        Download all packages"+    echo $ "    setup sandbox      Setup the sandbox"+    echo $ "    grep <expr> [opts] Search in the Music Suite source code"+    echo $ "    test [opts]        Run unit tests"+    echo $ "    foreach <command>  Run a command in each source directory"+    echo $ "                       In <command> you can use MUSIC_PACKAGE in place of the"+    echo $ "                       name of the current package, i.e `foreach echo MUSIC_PACKAGE`"+    echo $ "    package-path       Print a suitable GHC_PACKAGE_PATH value for use with runhaskell etc"+    echo $ "    document           Generate and upload documentation"+    echo $ "                           --no-api       Skip creating the API documentation"+    echo $ "                           --no-reference Skip creating the reference documentation"+    echo $ "                           --upload       Upload to server"     echo $ ""     echo $ "Deprecated commands:"-    echo $ "   install <package>  Reinstall the given package and its dependencies"+    echo $ "    install <package>  Reinstall the given package and its dependencies"+    echo $ ""+    echo $ "Deprecated flags:"+    echo $ "    document             --local             (does nothing)"  printVersion :: [String] -> Sh () printVersion _ = do@@ -351,18 +369,10 @@  document :: [String] -> Sh () document args = do--    let flagReinstall   = "--reinstall-transf" `elem` args     let flagNoApi       = "--no-api" `elem` args     let flagNoRef       = "--no-reference" `elem` args-    let flagLocal       = "--local" `elem` args+    let flagUpload      = "--upload" `elem` args -    if (flagReinstall)-        then do-            echo $ yellow $ "======================================================================"-            echo $ yellow $ "Reinstalling transf"-            reinstallTransf-        else return ()     if (not flagNoApi)         then do             echo $ yellow $ "======================================================================"@@ -375,7 +385,7 @@             echo $ yellow $ "Making reference documentation"             makeRef         else return ()-    if (not flagLocal)+    if (flagUpload)         then do             echo $ yellow $ "======================================================================"             echo $ yellow $ "Uploading documentation"@@ -384,14 +394,6 @@     return ()  -reinstallTransf :: Sh ()-reinstallTransf = do-    -- TODO check dir exists, otherwise return and warn-    chdir "transf" $ do-        run_ "cabal" ["clean"]-        run_ "cabal" ["configure"]-        run_ "cabal" ["install"]- reinstall :: String -> Sh () reinstall name = do     -- TODO check dir exists, otherwise return and warn@@ -455,7 +457,7 @@     let hyperl = ["--hyperlink-source"]     let packDb = ["--package-db"::Text, packDbPath]     let out    = ["-o", fromString path <> "/musicsuite.github.io/docs/api"]-    run "standalone-haddock" $ concat [hyperl, packDb, out, fmap fromString realPackages]+    run "standalone-haddock" $ concat [hyperl, packDb, out, fmap fromString packagesToDocument]     return ()      -- hsFiles <- getHsFiles