File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ def dotnet_version
62
62
end
63
63
end
64
64
65
+ def python_version
66
+ File . foreach ( 'py/BUILD.bazel' ) do |line |
67
+ return line . split ( '=' ) . last . strip . tr ( '"' , '' ) if line . include? ( 'SE_VERSION' )
68
+ end
69
+ end
70
+
65
71
# The build system used by webdriver is layered on top of rake, and we call it
66
72
# "crazy fun" for no readily apparent reason.
67
73
@@ -423,6 +429,17 @@ task :prepare_release do
423
429
Bazel ::execute ( 'build' , [ '--stamp' ] , '//rb:selenium-webdriver' )
424
430
end
425
431
432
+ PYPI_ASSETS = [
433
+ "bazel-bin/py/selenium-#{ python_version } -py3-none-any.whl" ,
434
+ "bazel-bin/py/selenium-#{ python_version } .tar.gz"
435
+ ]
436
+
437
+ task 'publish-pypi' do
438
+ PYPI_ASSETS . each do |asset |
439
+ sh "python3 -m twine upload #{ asset } "
440
+ end
441
+ end
442
+
426
443
task 'publish-maven' : JAVA_RELEASE_TARGETS do
427
444
creds = read_m2_user_pass
428
445
JAVA_RELEASE_TARGETS . each do |p |
You can’t perform that action at this time.
0 commit comments