release notes plumbing

This commit is contained in:
Keagan McClelland
2021-02-03 10:44:34 -07:00
committed by Aiden McClelland
parent 18df87b8f5
commit 44def3be85
5 changed files with 16 additions and 15 deletions

View File

@@ -150,12 +150,13 @@ getAppVersionForSpec appId spec = do
v <- o .: "version"
pure v
getLatestAgentVersion :: (Has RegistryUrl sig m, Has (Error S9Error) sig m, MonadIO m) => m Version
getLatestAgentVersion :: (Has RegistryUrl sig m, Has (Error S9Error) sig m, MonadIO m) => m (Version, Maybe Text)
getLatestAgentVersion = do
val <- registryRequest agentVersionPath
parseOrThrow agentVersionPath val $ withObject "version response" $ \o -> do
v <- o .: "version"
pure v
v <- o .: "version"
rn <- o .:? "release-notes"
pure (v, rn)
where agentVersionPath = "sys/version/agent"
getLatestAgentVersionForSpec :: (Has RegistryUrl sig m, Has (Lift IO) sig m, Has (Error S9Error) sig m)

View File

@@ -480,7 +480,7 @@ replaceDerivativeCerts :: (HasFilesystemBase sig m, Fused.Has (Error S9Error) si
replaceDerivativeCerts = do
sid <- getStart9AgentHostname
let hostname = sid <> ".local"
tor <- getAgentHiddenServiceUrl
torAddr <- getAgentHiddenServiceUrl
caKeyPath <- toS <$> getAbsoluteLocationFor rootCaKeyPath
caConfPath <- toS <$> getAbsoluteLocationFor rootCaOpenSslConfPath
@@ -531,7 +531,7 @@ replaceDerivativeCerts = do
, duration = 365
}
hostname
tor
torAddr
liftIO $ do
putStrLn @Text "openssl logs"
putStrLn @Text "exit code: "

View File

@@ -7,9 +7,7 @@ import Network.HTTP.Client
import Network.Connection
import Lib.SystemPaths
import Network.HTTP.Client.TLS ( mkManagerSettings
, newTlsManagerWith
)
import Network.HTTP.Client.TLS ( mkManagerSettings )
import Data.Default
getAgentHiddenServiceUrl :: (HasFilesystemBase sig m, MonadIO m) => m Text