mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
release notes plumbing
This commit is contained in:
committed by
Aiden McClelland
parent
18df87b8f5
commit
44def3be85
7
agent/src/Lib/External/Registry.hs
vendored
7
agent/src/Lib/External/Registry.hs
vendored
@@ -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)
|
||||
|
||||
@@ -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: "
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user