File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff 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
165170def run_publish_close_and_release_tasks (root_project_dir , publish_task : str ):
166171 gradle_command = f"./gradlew { publish_task } closeAndReleaseStagingRepository"
@@ -211,7 +216,7 @@ def main(args: argparse.Namespace):
211216 # First release on Maven
212217 run_publish_close_and_release_tasks (
213218 project_root ,
214- get_publish_task (args .module ),
219+ get_publish_task (args .module , args . version . endswith ( "-SNAPSHOT" ) ),
215220 )
216221
217222 if not args .version .endswith ("-SNAPSHOT" ):
You can’t perform that action at this time.
0 commit comments