Skip to content

Commit 96e6d2b

Browse files
committed
Try having special logic for snapshot publishing
1 parent 72518ba commit 96e6d2b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/release_sdk.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,19 @@ def get_asset_path(root_project_dir: str, module: Module) -> str:
153153
raise ValueError(f"Unknown module: {module}")
154154

155155

156-
def get_publish_task(module: Module) -> str:
156+
def get_publish_task(module: Module, is_snapshot: bool) -> str:
157157
if module == Module.SDK:
158-
return ":sdk:sdk-android:publishToSonatype"
158+
command = ":sdk:sdk-android:publishToSonatype"
159159
elif module == Module.CRYPTO:
160-
return ":crypto:crypto-android:publishToSonatype"
160+
command = ":crypto:crypto-android:publishToSonatype"
161161
else:
162162
raise ValueError(f"Unknown module: {module}")
163163

164+
if is_snapshot:
165+
return f"{command} -Psnapshot"
166+
else:
167+
return command
168+
164169

165170
def run_publish_close_and_release_tasks(root_project_dir, publish_task: str):
166171
gradle_command = f"./gradlew {publish_task} closeAndReleaseStagingRepository"

0 commit comments

Comments
 (0)