diff --git a/app/Spago.hs b/app/Spago.hs index 21501292d..e85d6e81d 100644 --- a/app/Spago.hs +++ b/app/Spago.hs @@ -235,7 +235,7 @@ parser = do search = ( "search" - , "Run the search engine." + , "Start a search REPL to find definitions matching names and types" , pure Search ) diff --git a/src/Spago/Build.hs b/src/Spago/Build.hs index c3daffdb7..75c0b0588 100644 --- a/src/Spago/Build.hs +++ b/src/Spago/Build.hs @@ -218,7 +218,7 @@ docs format sourcePaths depsOnly = do echoDebug $ "Running `" <> cmd <> "`" shell cmd empty >>= \case ExitSuccess -> pure () - ExitFailure n -> die $ "Failed while trying to make the documentation searchable: " <> repr n + ExitFailure n -> echo $ "Failed while trying to make the documentation searchable: " <> repr n where isHTMLFormat = \case diff --git a/src/Spago/Prelude.hs b/src/Spago/Prelude.hs index fc273b945..7770a2b91 100644 --- a/src/Spago/Prelude.hs +++ b/src/Spago/Prelude.hs @@ -71,6 +71,7 @@ module Spago.Prelude , withTaskGroup' , Turtle.mktempdir , getModificationTime + , docsSearchVersion ) where @@ -241,3 +242,8 @@ assertDirectory directory = do Directory.createDirectory directory Directory.setPermissions directory private + + +-- | Release tag for the `purescript-docs-search` app. +docsSearchVersion :: Text +docsSearchVersion = "v0.0.4" diff --git a/src/Spago/Templates.hs b/src/Spago/Templates.hs index 81ce8d22d..547496bc7 100644 --- a/src/Spago/Templates.hs +++ b/src/Spago/Templates.hs @@ -6,6 +6,7 @@ import Data.FileEmbed (embedFile) import qualified Data.Text as T import Spago.TH (embedFileUtf8, embedURLWithFallback) +import Spago.Prelude packagesDhall :: T.Text @@ -29,11 +30,17 @@ bowerJson = $(embedFile "templates/bower.json") docsSearchApp :: T.Text docsSearchApp = $(embedURLWithFallback - "https://github.com/spacchetti/purescript-docs-search/releases/download/v0.0.4/docs-search-app.js" + ( "https://github.com/spacchetti/purescript-docs-search/releases/download/" + <> T.unpack docsSearchVersion + <> "/docs-search-app.js" + ) "templates/docs-search-app.js") docsSearch :: T.Text docsSearch = $(embedURLWithFallback - "https://github.com/spacchetti/purescript-docs-search/releases/download/v0.0.4/purescript-docs-search" + ( "https://github.com/spacchetti/purescript-docs-search/releases/download/" + <> T.unpack docsSearchVersion + <> "/purescript-docs-search" + ) "templates/purescript-docs-search")