Преглед на файлове

Use twine environment variables if set (#3353)

Eric Brown преди 1 година
родител
ревизия
d50be7eab1
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      reflex/custom_components/custom_components.py

+ 4 - 2
reflex/custom_components/custom_components.py

@@ -616,15 +616,17 @@ def publish(
         help="The API token to use for authentication on python package repository. If token is provided, no username/password should be provided at the same time",
         help="The API token to use for authentication on python package repository. If token is provided, no username/password should be provided at the same time",
     ),
     ),
     username: Optional[str] = typer.Option(
     username: Optional[str] = typer.Option(
-        None,
+        os.getenv("TWINE_USERNAME"),
         "-u",
         "-u",
         "--username",
         "--username",
+        show_default="TWINE_USERNAME environment variable value if set",
         help="The username to use for authentication on python package repository. Username and password must both be provided.",
         help="The username to use for authentication on python package repository. Username and password must both be provided.",
     ),
     ),
     password: Optional[str] = typer.Option(
     password: Optional[str] = typer.Option(
-        None,
+        os.getenv("TWINE_PASSWORD"),
         "-p",
         "-p",
         "--password",
         "--password",
+        show_default="TWINE_PASSWORD environment variable value if set",
         help="The password to use for authentication on python package repository. Username and password must both be provided.",
         help="The password to use for authentication on python package repository. Username and password must both be provided.",
     ),
     ),
     build: bool = typer.Option(
     build: bool = typer.Option(