-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more configuration for publish (#2435)
Add options for configuring timeouts and retries of publishing operations
- Loading branch information
1 parent
e10df04
commit 89c2758
Showing
11 changed files
with
166 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
modules/cli/src/main/scala/scala/cli/commands/publish/PublishConnectionOptions.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package scala.cli.commands.publish | ||
|
||
import caseapp.* | ||
|
||
import scala.cli.commands.shared.{HelpGroup, SharedVersionOptions} | ||
import scala.cli.commands.tags | ||
|
||
// format: off | ||
final case class PublishConnectionOptions( | ||
@Group(HelpGroup.Publishing.toString) | ||
@HelpMessage("Connection timeout, in seconds.") | ||
@Tag(tags.restricted) | ||
@Hidden | ||
connectionTimeoutSeconds: Option[Int] = None, | ||
|
||
@Group(HelpGroup.Publishing.toString) | ||
@HelpMessage("How many times to retry establishing the connection on timeout.") | ||
@Tag(tags.restricted) | ||
@Hidden | ||
connectionTimeoutRetries: Option[Int] = None, | ||
|
||
@Group(HelpGroup.Publishing.toString) | ||
@HelpMessage("Waiting for response timeout, in seconds.") | ||
@Tag(tags.restricted) | ||
@Hidden | ||
responseTimeoutSeconds: Option[Int] = None, | ||
|
||
@Group(HelpGroup.Publishing.toString) | ||
@HelpMessage("How many times to retry the staging repository operations on failure.") | ||
@Tag(tags.restricted) | ||
@Hidden | ||
stagingRepoRetries: Option[Int] = None, | ||
|
||
@Group(HelpGroup.Publishing.toString) | ||
@HelpMessage("Time to wait between staging repository operation retries, in milliseconds.") | ||
@Tag(tags.restricted) | ||
@Hidden | ||
stagingRepoWaitTimeMilis: Option[Int] = None | ||
) | ||
// format: on | ||
|
||
object PublishConnectionOptions { | ||
implicit lazy val parser: Parser[PublishConnectionOptions] = Parser.derive | ||
implicit lazy val help: Help[PublishConnectionOptions] = Help.derive | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters