Skip to content

Bump pre-release version to be greater than stable releases#8728

Merged
jakirkham merged 3 commits intodask:mainfrom
charlesbluca:bump-nightly-version
Feb 16, 2022
Merged

Bump pre-release version to be greater than stable releases#8728
jakirkham merged 3 commits intodask:mainfrom
charlesbluca:bump-nightly-version

Conversation

@charlesbluca
Copy link
Copy Markdown
Member

This PR changes the version of the pre-release packages to be one patch version ahead of the latest stable release, so that conda interprets them as newer than the stable release they follow.

cc @jakirkham

  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

Copy link
Copy Markdown
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Charles!

Generally looks good. Had some thoughts on simplifying things below.

Comment on lines +42 to +46
# compute pre-release package versions (current dask version with patch version bumped)
IFS='.' read -ra arr <<< `git describe --tags | awk '{split($0,a,"-"); print a[1]}'`
declare -i patch=${arr[-1]}+1
export VERSION=${arr[0]}.${arr[1]}.$patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be simpler to do in the recipe directly using Jinja

@@ -1,5 +1,4 @@
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev') + environ.get('VERSION_SUFFIX', '') %}
{% set py_version=environ.get('CONDA_PY', 36) %}
{% set version = environ.get('VERSION', '0.0.0.dev') + environ.get('VERSION_SUFFIX', '') %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example using Jinja we could do something like this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks that example definitely looks much cleaner 🙂

number: {{ GIT_DESCRIBE_NUMBER }}
noarch: python
string: py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
string: py_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@jakirkham jakirkham merged commit 59d4f0f into dask:main Feb 16, 2022
@jakirkham
Copy link
Copy Markdown
Member

Thanks Charles! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants