Skip to content

Commit

Permalink
Add new tool for generating versions (#80)
Browse files Browse the repository at this point in the history
This tool will be used to generate standardized versions for RAPIDS
packages.
  • Loading branch information
vyasr authored Oct 5, 2023
1 parent be5e75a commit baa3d3e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/rapids-generate-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# A utility script that generates a package version
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-generate-version"

dunamai_format="{base}"
if ! rapids-is-release-build; then
# Nightlies include the distance from the last tag as the alpha version.
dunamai_format="{base}{stage}{distance}"
fi

# Now change the version.
dunamai_version=$(python -m dunamai from git --format \"${dunamai_format}\")

echo -n "${dunamai_version}"

0 comments on commit baa3d3e

Please sign in to comment.