Skip to content

Commit 739f5ec

Browse files
committed
[build] Tweaking how nightly build version in Python works
1 parent 7384157 commit 739f5ec

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
cache-key: python-nightly
4848
run: |
4949
./go "py:version[nightly]"
50-
./go py:release
50+
./go py:build
51+
twine upload --repository testpypi bazel-bin/py/selenium-4*.whl bazel-bin/py/selenium-4*.tar.gz
5152
secrets: inherit
5253

5354

Rakefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,15 @@ namespace :py do
629629
# 1. Switching from a release build to a nightly one
630630
# 2. Updating a nightly build for the next nightly build
631631
# 3. Switching from nightlies to a release build.
632-
# According to PEP440, the way to indicate a nightly build is `M.m.v.devN`
633-
# Where `N` is sorted numerically. That means we can create the dev
634-
# version number from today's date.
635632

636633
if bump_nightly && old_version.include?('.dev')
637-
new_version = old_version.gsub(/\d+$/, "#{Time.now.strftime("%Y%m%d%H%M")}")
634+
# This is the case where we are updating a nightly build to the next nightly build.
635+
# This change is usually done by the CI system and never committed.
636+
# The ".dev" is removed to have the pushed package in TestPyPi be shown as latest.
637+
new_version = old_version.gsub(/\.dev\d+$/, '') + + ".#{Time.now.strftime("%Y%m%d%H%M")}"
638638
elsif bump_nightly
639+
# This is the case after a production release and the version number is configured
640+
# to start doing nightly builds.
639641
new_version = old_version + ".dev#{Time.now.strftime("%Y%m%d%H%M")}"
640642
else
641643
new_version = updated_version(old_version.gsub(/\.dev\d+$/, ''), arguments[:version])

0 commit comments

Comments
 (0)