Normalize S3 bucket name to lowercase
publish / publish-tauri (, windows-latest) (release) Successful in 5m44s
publish / publish-tauri (, windows-latest) (release) Successful in 5m44s
S3 and MinIO bucket naming conventions require names to be lowercase. This change ensures that the bucket name derived from the `S3_BUCKET` environment variable (or default) is always converted to lowercase, preventing potential configuration errors.
This commit is contained in:
+3
-1
@@ -183,7 +183,9 @@ def main(version: Optional[str] = None, app_dir: Optional[str] = None) -> None:
|
|||||||
if not artifact_base_url:
|
if not artifact_base_url:
|
||||||
raise ConfigurationError("ARTIFACT_BASE_URL is required")
|
raise ConfigurationError("ARTIFACT_BASE_URL is required")
|
||||||
|
|
||||||
bucket_name = os.environ.get("S3_BUCKET", "gitlite")
|
# S3/MinIO bucket names must be lowercase, so normalise regardless of how the
|
||||||
|
# S3_BUCKET variable is cased (e.g. "GitLite" -> "gitlite").
|
||||||
|
bucket_name = (os.environ.get("S3_BUCKET") or "gitlite").lower()
|
||||||
bucket_prefix = (app_dir or os.environ.get("APP_DIR") or "gitlite").strip("/")
|
bucket_prefix = (app_dir or os.environ.get("APP_DIR") or "gitlite").strip("/")
|
||||||
|
|
||||||
artifacts = _collect_artifacts()
|
artifacts = _collect_artifacts()
|
||||||
|
|||||||
Reference in New Issue
Block a user