mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-30 11:14:52 +00:00
prepare v1 release (#189)
* update servers * update version * update simplexmq version * update database file names * update server fingerprints and simlexmq * update simplexmq commit * fix port in tests * update tls fixtures (#193) * add -v cli option; print update instructions on -v and /v (#194) Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
809a87ce61
commit
5a74b8066f
+15
-15
@@ -7,6 +7,7 @@ import qualified Data.ByteString.Char8 as B
|
||||
import Data.List.NonEmpty (NonEmpty)
|
||||
import qualified Data.List.NonEmpty as L
|
||||
import Options.Applicative
|
||||
import Simplex.Chat.Controller (updateStr, versionStr)
|
||||
import Simplex.Messaging.Agent.Protocol (SMPServer (..))
|
||||
import Simplex.Messaging.Encoding.String
|
||||
import Simplex.Messaging.Parsers (parseAll)
|
||||
@@ -24,8 +25,9 @@ chatOpts appDir =
|
||||
( long "database"
|
||||
<> short 'd'
|
||||
<> metavar "DB_FILE"
|
||||
<> help ("sqlite database file path (" <> defaultDbFilePath <> ")")
|
||||
<> help "Path prefix to chat and agent database files"
|
||||
<> value defaultDbFilePath
|
||||
<> showDefault
|
||||
)
|
||||
<*> option
|
||||
parseSMPServer
|
||||
@@ -33,18 +35,17 @@ chatOpts appDir =
|
||||
<> short 's'
|
||||
<> metavar "SERVER"
|
||||
<> help
|
||||
( "SMP server(s) to use"
|
||||
<> "\n(smp2.simplex.im,smp3.simplex.im)"
|
||||
)
|
||||
"Comma separated list of SMP server(s) to use \
|
||||
\(default: smp4.simplex.im,smp5.simplex.im,smp6.simplex.im)"
|
||||
<> value
|
||||
( L.fromList
|
||||
[ "smp://z5W2QLQ1Br3Yd6CoWg7bIq1bHdwK7Y8bEiEXBs_WfAg=@smp2.simplex.im", -- London, UK
|
||||
"smp://nxc7HnrnM8dOKgkMp008ub_9o9LXJlxlMrMpR-mfMQw=@smp3.simplex.im" -- Fremont, CA
|
||||
[ "smp://CTMzyymBBawF0yuMln3UxTip6RgFVtYPL8UYuCoIBwE=@139.162.205.110", -- London, UK
|
||||
"smp://t82czNx4tiftzbk_M4KEITL1RS9CmcTWiCLHSlNsEZ8=@96.126.97.196" -- Fremont, CA
|
||||
]
|
||||
)
|
||||
)
|
||||
where
|
||||
defaultDbFilePath = combine appDir "simplex"
|
||||
defaultDbFilePath = combine appDir "simplex_v1"
|
||||
|
||||
parseSMPServer :: ReadM (NonEmpty SMPServer)
|
||||
parseSMPServer = eitherReader $ parseAll servers . B.pack
|
||||
@@ -52,12 +53,11 @@ parseSMPServer = eitherReader $ parseAll servers . B.pack
|
||||
servers = L.fromList <$> strP `A.sepBy1` A.char ','
|
||||
|
||||
getChatOpts :: FilePath -> IO ChatOpts
|
||||
getChatOpts appDir = execParser opts
|
||||
getChatOpts appDir =
|
||||
execParser $
|
||||
info
|
||||
(helper <*> versionOption <*> chatOpts appDir)
|
||||
(header versionStr <> fullDesc <> progDesc "Start chat with DB_FILE file and use SERVER as SMP server")
|
||||
where
|
||||
opts =
|
||||
info
|
||||
(chatOpts appDir <**> helper)
|
||||
( fullDesc
|
||||
<> header "Chat prototype using Simplex Messaging Protocol (SMP)"
|
||||
<> progDesc "Start chat with DB_FILE file and use SERVER as SMP server"
|
||||
)
|
||||
versionOption = infoOption versionAndUpdate (long "version" <> short 'v' <> help "Show version")
|
||||
versionAndUpdate = versionStr <> "\n" <> updateStr
|
||||
|
||||
Reference in New Issue
Block a user