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
6262 end
6363end
6464
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+
6571# The build system used by webdriver is layered on top of rake, and we call it
6672# "crazy fun" for no readily apparent reason.
6773
@@ -423,6 +429,17 @@ task :prepare_release do
423429 Bazel ::execute ( 'build' , [ '--stamp' ] , '//rb:selenium-webdriver' )
424430end
425431
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+
426443task 'publish-maven' : JAVA_RELEASE_TARGETS do
427444 creds = read_m2_user_pass
428445 JAVA_RELEASE_TARGETS . each do |p |
You can’t perform that action at this time.
0 commit comments